ReactJS — State Management
This is a very useful and powerful way to organize code to make it more sustainable and easier to work with.
When working on a React application one of the things a developer must bear in mind is something called state management. This basically means keeping track of how your application data changes over time.
By managing the state of your application you are able to create a dynamic application that responds to your user's input. Be it adding an item to your cart or simply subscribing to a newsletter. All of this requires a certain state management system.
According to the ReactJS documentation, Hooks are the preferred method to manage state. There are a couple of other ways too, like Redux which is a third-party library that assists you to manage state.
Hooks are a broad set of tools that run custom functions when certain components' props change. This is used with React functional components and requires no classes. Thus the developer can write more readable code that is easy to share and maintain.