Why useEffect is running twice in React
If you have created a new project recently using Create React App
or upgraded to React version 18, you will see that the useEffect hook gets executed twice in development mode.
If you are new to useEffect hook, you can read one of my previous article...
codingdeft.hashnode.dev2 min read