Loading
A React hook for running code after the component renders — used for fetching data, timers, and subscriptions.
Runs after every render by default. A dependency array limits re-runs. The optional cleanup function (returned from the effect) runs before the next effect and on unmount — use it to clear timers, cancel requests, and unsubscribe.
Fires asynchronously after paint (non-blocking). `useLayoutEffect` fires synchronously after DOM mutation but before paint — use it only when you need to read layout. Strict Mode runs effects twice in development to surface cleanup bugs.