April 2020
Intermediate to advanced
716 pages
18h 55m
English
We can define stateful React components with ES6 classes or by using Hooks without writing a class. React components defined using ES6 classes have access to life cycle methods, the this keyword, and can manage state with setState when building stateful components. Similarly, React components defined with a function can also access some of these features using Hooks, such as managing state with the useState Hook, in order to build stateful components.
Stateful components allow us to build interactive components that can manage to change data in the state, and propagate any business logic that needs to be applied across the UI. Generally, for complex UIs, stateful components should be higher-level ...
Read now
Unlock full access