Code React Sweetly
/
JSX
JSX
https://leanpub.com/code-react-sweetly
Can React Work Without JSX?
https://leanpub.com/code-react-sweetly
Example 1: Creating React element with JSX
https://leanpub.com/code-react-sweetly
Example 2: Creating React element with regular JavaScript
https://leanpub.com/code-react-sweetly
What Is React.createElement()?
https://leanpub.com/code-react-sweetly
How to Use JSX
https://leanpub.com/code-react-sweetly
Use JSX like any JavaScript expression
https://leanpub.com/code-react-sweetly
Wrap multi-line JSX in parentheses
https://leanpub.com/code-react-sweetly
Wrap expressions in curly braces
https://leanpub.com/code-react-sweetly
Use camelCase to name attributes
https://leanpub.com/code-react-sweetly
Close empty JSX tags properly
https://leanpub.com/code-react-sweetly
A React component can return only a single element
https://leanpub.com/code-react-sweetly
Time to Practice with JSX
https://leanpub.com/code-react-sweetly
The solution
https://leanpub.com/code-react-sweetly
Up next
Components
In this chapter
JSX
Can React Work Without JSX?
What Is React.createElement()?
How to Use JSX
Time to Practice with JSX