Is a React Hook Allows you to synchronise a component with an external system. Used for Tasks that happen outside the normal rendering system,such as fetching data,setting up subscriptions,manually manipulate the DOM Allows you to perform side effects in your components. useEffect accepts two arguments. The second argument is optional. useEffect(, ) We should always include the second parameter which accepts an array. We can optionally pass dependencies to useEffect in this array In React, useEffect runs after every render by default, so your (settimer)timer keeps repeating. To control it, use a dependency array: [] → run only once, [count] → run when count changes. Without dependencies, it keeps re-running and causes continuous updates. Always add dependencies properly to make your Effect run only when needed. It replaces lifecycle methods like componentDidMount, componentDidUpdate, and componentWillUnmount in class components.…