Closed penx closed 9 months ago
Removing unnecessary Effects will make your code easier to follow, faster to run, and less error-prone https://react.dev/learn/you-might-not-need-an-effect
The current usage of useEffect falls under "Updating state based on props or state" and is not necessary.
https://react.dev/learn/you-might-not-need-an-effect#updating-state-based-on-props-or-state
Using useEffect means an additional render.
The current usage of useEffect falls under "Updating state based on props or state" and is not necessary.
https://react.dev/learn/you-might-not-need-an-effect#updating-state-based-on-props-or-state
Using useEffect means an additional render.