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

May 30, 2025 - 05:10
 0
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