Reading
JSX
Embedding Expressions using JSX using curly braces.
var name = 'Sam Spiegel'
const welcome = <h1> 'Welcome, {name}' </h1>
Rendering an Element into the DOM
<div id="root"></div>
This is a ‘root’ DOM node. Anything passed into it will be managed by Readct DOM. In order to render a React element in the root node, pass the element and the node into
For example:
const myElement = <h1>Hi there!</h1> ReactDOM.render(myElement, document.getElementById(‘root’) ```
Updating Rendered Elements
- React elements are immutable
- The only way to update the UI is to create a new element with ReactDOM.render()
TailwindCss
- Allows the ability to not write any custom CSS.
- Look up desired styling feature on tailwindcss.com
- Is written directly in an HTML tag as class attribute