[windows]: useBabunthat provideCygwinenvironment and bundle some useful tools instead ofCMD
- Node must be required
$ npm i -g create-react-appthat is a react sead project scaffold created by React
- A JAVASCRIPT LIBRARY FOR BUILDING USER INTERFACES
Componentis base onJAVASCRIPTinstead of template , can easily pass data or keep state- NO DOM , friendly to devloper
Shadow DOM,Component, toward future- learn once, use anywhere
Like as const element = <h1>Hello, world!</h1> , a syntax extension to javascript
- can embed expression js code
- after compilation , will became regular js object
- string attributes use quotes, js expression use curly braces, like as
const ele = <img src={user.avatarUrl} /> - must uses
camelCaseproperty naming convention instead of HTML attribute names
Element is smallest building blocks in React App, unlike normal browser DOM, element is a plain js object
- element is immutable, there is only way to update UI that is call
ReactDOM.render(), although maybe have mutiple calls, React only update what's necessary
- Component
- Props
- State
- ...