In my previous posthttps://coderlegion.com/12179/stop-writing-messy-states-why-i-swapped-useeffect-for-react-router-loaders, I discussed how to get rid of Messy State by moving from useEffect to React Router Loaders.
We successfully cleaned up our c...
We have all been there... You create a new component, and the first thing you do is set up the trinity of data fetching state:
1. loading
2. error
3. data
Then, you write the inevitable useEffect hook. It usually looks something like this:
const u...