Please enable JavaScript.
Coggle requires JavaScript to display documents.
JSX (Children (JS expressions as a Children (<Component>{list…
JSX
Children
JS expressions as a Children
<Component>{list.map(item=><ListItem>{item.text}</Item>})}</Component>
Functions as children
Booleans, Null, Undefined are ignored
String literals
JSX children -> nested components or array of components
Props in JSX
JS expressions as props
String literals:
text="some text" || text={"some text"}
unasceped html
Props default to "True"
Spread attributes
Choosing the type at runtime
const SpesificComponent = myComponents[type];
<SpecificComponent />
React must be in scope
React.createElement(component, props, ...children)
Using Dot notation for JSX type
User defined components must be capitalized