Zero to React
npm install
npm start
Open localhost:5000
in your browser.
Convert state data to a concanenated HTML string.
Task: add a checkbox with include_wordpressdotcom
flag:
suggestions( query );
suggestions( { query, include_wordpressdotcom: true });
Or use quantity
or include_dotblogsubdomain
.
Do the same thing, but with React elements. Verify that it solves the focus problems.
Understand that JSX is an optional (and popular) syntactic sugar over React.createElement
.
Only here we start to need a build step.
Rerender just parts of the tree. Maintain local private state of a component.
Task: Display the cost only after clicking "more". Hide it after clicking "less".
Advanced stuff: reacting to data from a stream, higher-order component abstraction