Skip to content

Reading: Props and State

Jacob-Wendt edited this page Jun 27, 2019 · 1 revision

Understanding React setState

  • State can be anything.
  • React components with state render UI based on that state.
  • setState() is the only legitimate way to update state after the initial state setup.

Differences between functional and class-Components

  • The most obvious one difference is the syntax. A functional component is just a plain JavaScript function which accepts props as an argument and returns a React element.

Clone this wiki locally