What is useEffect in React?
useEffect is a built-in React Hook that lets you run code after the component renders. It’s commonly used for: Fetching data from APIs Setting up subscriptions Updating the DOM Cleaning up on unmount

useEffect
is a built-in React Hook that lets you run code after the component renders.
It’s commonly used for:
- Fetching data from APIs
- Setting up subscriptions
- Updating the DOM
- Cleaning up on unmount