9 ms·
> all criticisms welcome :) No criticism really. Your useMemo example is the right use. Your useEffect use is fine, but for things like api calls (which 'call
by Octoth0rpe 1y ago
> all criticisms welcome :)
No criticism really. Your useMemo example is the right use. Your useEffect use is fine, but for things like api calls (which 'call something outside of react' may refer to), you're often better leaning on something like react-query, which is of course built on top of useEffect. So still the right tool, but let others handle many of the sharp edges around that problem.
- adithyassekhar 1y agoThanks. I've started with rtk and saga hence the useEffect. I've since moved to rtk query.