Reading:28 Props and State - 401-advanced-javascript-hanna-alemu/seattle-javascript-401d31 GitHub Wiki

What is State?

It can be anything literally. But we can think of it as the way things are. When it changes in the component, the UI changes as well.

  • SetState() updates the state

  • Props are passed from the parent App to the components, the components use callbacks to affect the state of the app.

  • Different components have different behaviours.

  • We also must use preventDefault() to stop the app from reloading everytime something happens