React: useEffect() Hook
The useEffect Hook allows you to perform side effects in your components. It takes two arguments, first is setup function, a function with your effect's logic. and second is dependencies, which is an optional argument useEffect(<setup>, <dependencies>) Example: Dependencies is an optional argument,