What is a Hook

Use the useState hook to re-render a component when its data changes, and the useEffect hook to run code such as an API call when the component loads or a value changes.

Updated

Cheat sheet: What is a Hook
Category
React
Level
Apprentice
Tags
react