See in action at React Hooks Playground
- Hooks are functions that let you “hook into” React state and life cycle features from function components
- More information at React Introducing Hooks
- Hooks allow you to reuse stateful logic without changing your component hierarchy.
- Hooks let you split one component into smaller functions based on what pieces are related (such as setting up a subscription or fetching data
- Code is cleaner.
- Toggler
- Simple Form
- Clicker (with
useEffect()
) - Fetch API at https://swapi.co