useEffect
Also written: effect hook
The hook that runs a function after React updates the page, used for side effects like loading products. A dependency array controls when it re-runs, and a returned cleanup function undoes it.
Also written: effect hook
The hook that runs a function after React updates the page, used for side effects like loading products. A dependency array controls when it re-runs, and a returned cleanup function undoes it.