Hacker News new | ask | show | jobs
by Octoth0rpe 250 days 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.

1 comments

Thanks. I've started with rtk and saga hence the useEffect. I've since moved to rtk query.