Chapter 4: Getting Started with Hooks
One of the most anticipated new features of React is Hooks, an API that allows your functional components to "hook" into React functionality. The overarching motivation for this feature is to simplify your components. For example, forcing React developers to use classes to define their components leads to the overuse of wrapper components to pass state around their apps. With Hooks, you can stick with simple functions to implement your components and have a clear picture of how everything fits together.
In this chapter, we'll cover the following topics:
- Maintaining state using Hooks
- Performing initialization and cleanup actions
- Sharing data using context Hooks
- Using reducer Hooks to scale state management