This project contains demos for how to correctly and incorrectly use state with React components. The examples are implemented in both class components and function components.
The demo can be found here: http://tylerhawkins.info/react-component-state-demo/build/
A write-up of this content with more explanations can be found here: https://dev.to/thawkin3/3-react-mistakes-junior-developers-make-with-component-state-1bhd
If you'd like to run the demo locally:
- Clone the repo
yarn install
yarn start