Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class
Hooks are:
-
Completely opt-in. You can try Hooks in a few components without rewriting any existing code.
- 100% backwards-compatible. Hooks don’t contain any breaking changes.