"Don't load data in useEffect!"
Okay, but [this and that and this] so how should you actually do this?
"Oh, use useEffect duh! We meant.. Don't, like, use it too much."
"And React function components should always be pure!"
Wait, aren't the hooks storing and mixing states into the function in a way that's almost creating a sorta sudo object? How is that pure?
"No, we mean 'they are pure!' when we want to be dismissive. Of course they are not really "pure".."
Edit: The one weird trick they don't want you to know and will have all the React CRUD kiddies screeching; Use useMemo to kick off work early ;)
"Don't load data in useEffect!"
Okay, but [this and that and this] so how should you actually do this?
"Oh, use useEffect duh! We meant.. Don't, like, use it too much."
"And React function components should always be pure!"
Wait, aren't the hooks storing and mixing states into the function in a way that's almost creating a sorta sudo object? How is that pure?
"No, we mean 'they are pure!' when we want to be dismissive. Of course they are not really "pure".."
Edit: The one weird trick they don't want you to know and will have all the React CRUD kiddies screeching; Use useMemo to kick off work early ;)