Skip to content

Instantly share code, notes, and snippets.

View ajcairel's full-sized avatar

Alexander Cairel ajcairel

View GitHub Profile

Fundamentals of React

React Fundamental Summary
React
  • A JS library for building dynamic UIs using components.
JSX
  • A syntax extension to JS that looks like HTML and makes defining UIs more intuitive vs. pure JS.
  • JSX emits text in the page when a JS expression is surrounded with curly braces
    <div>{/* JS Expression */}</div>.
  • JSX transpiles into a function call that returns a JS object, thus, JSX can be assigned to variables, passed as arguments to functions, etc.
  • JSX can render an array of components, however, each component needs a key prop with a unique value.
    const catList = cats.map(c => <div key={cat.id}>{cat.name}</div>);.
Components
  • A user interface is defined by a hierarchy of components.
User-Defined Component May be defined as a function or class but must be n
@rxaviers
rxaviers / gist:7360908
Last active September 25, 2024 08:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: