There's nothing like old fashioned mental conditioning.
In order to emphasize one of the most important rules in React, you will write/render it 100 times:
"I will never mutate state or props directly"
This means NOT doing this:
this.state.count = 1
this.state.props = true
In class-based components, state
should only be modified using the React Component's setState method. For today, we will only be creating class components.
- Use
create-react-app
to scaffold an app
- Write "I will never mutate state or props directly" 100 times. In other words create a component and reuse it 100 times.
- Research CSS, and attempt to style the page to look like writing on a chalkboard (an idea called
skeuomorphic design
).
- Investigate the Array object's fill and map functions - these will help you in your journey.