# 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.

![Cheat sheet: What is a Hook](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/87e3391e14164529b39f54255327d6ad.webp)

- Category: React
- Level: Apprentice
- Tags: react
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/react-hooks-what-is-a-hook-cheat-sheet
