DEV Community

Mohan Mogi
Mohan Mogi

Posted on

Understanding useEffect in React:

useEffect:
useEffect is a React Hook that lets you perform side effects in a functional component.
Common side effects are:
Fetching data from an API,Updating the document title,Setting timers (setInterval, setTimeout),Adding event listeners,Accessing local storage.useEffect accepts two arguments. The second argument is optional.useEffect(, ).

Top comments (0)