DEV Community

ScorbicLife
ScorbicLife

Posted on • Updated on

Interactivity

https://react.dev/learn/adding-interactivity

Recapping the concepts I know.

State

  • setState: sets the state for the next render.
  • State is private to each instance of a component. If you render the same component in two different places, each will have its own separate state.
  • React hooks rely on a fixed call order.

Render and Commit

  • A component re-renders if and only if its state or it's parents' state are changed. (Specifically, props has nothing to do with re-renders, unless one uses memo.)

Top comments (0)