Class Twenty-One Notes (401)
React
React Quick Start
- React Apps are built with components, which uses a markup syntax called JSX. JSX is stricter than HTML components.
- To embed JS in JSX, the content should be enclosed in curly braces. And in React, there is no special syntax for writing conditions. Instead, you’ll use the same techniques as you use when writing regular JavaScript code
- React respond to user’s inputs using event listeners
- The word
use
indicates that a React components manages data with a hook, React components share data via states.
Render and Commit
- The refresh a ReactUI, the 3 steps include triggering, rendering, and committing.
- To trigger updates to a component after the initial render, the component can be triggerred using
set
.
- After React updates its DOM, the page must re-render before the user sees the change
Back to main page
References