Anyways; useMemo in your example will not help at all; the fiber that holds the component will only rerender when its props changes, same as useMemo. An example where it would actually help: if you had a callback that had to be created dynamically inside your component or whatever you used inside there was computation-heavy.
Also, for ajax requests, you need no redux nor thunks. The second last example of my post shows how to do it in an effect.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I wrote something that relates to your article: dev.to/lexlohr/react-hooks-tripwir...
Anyways;
useMemo
in your example will not help at all; the fiber that holds the component will only rerender when its props changes, same asuseMemo
. An example where it would actually help: if you had a callback that had to be created dynamically inside your component or whatever you used inside there was computation-heavy.Also, for ajax requests, you need no redux nor thunks. The second last example of my post shows how to do it in an effect.