See previous session
- Arrow functions
- Classes
let
andconst
- Object and array destructuring
- Template literals
- https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Manipulating_documents
- https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction
Follow the tutorial: https://reactjs.org/docs/hello-world.html
We have chosen this tutorial over the "learn by doing" one because it introduces the concepts behind React. It is very well done and very complete.
It is a good exercise to start from a Vanilla JS template and setup CodeSandbox.
- Go to https://codesandbox.io/
- Start a Vanilla JS project
- Add
react
andreact-dom
dependencies - Add the simplest React app from the tutorial and get it to work!
Use one of our hiring exercises.
Basics:
- What is the difference between elements and components?
- What is JSX?
- Is it ok to modify props?
- How should you modify state?
- What does "the data flows down" mean?
- How do you pass arguments to event handlers?
- How do you put conditionals in JSX?
- How do you put inline if-else in JSX?
- How do you prevent a component from rendering?
- What is the
key
prop? - What are controlled and uncontrolled components?
- What does it mean to "lift state up"?
- Should you use composition or inheritance with React?
Advanced: