Re:A (Mostly) Complete Guide to React Rendering Behavior
by acemarke on Thursday December 30, 2021 @02:49PM
(#29740663)
Heh, you're welcome!
Out of curiosity, what do you mean by "converting completely to hooks" and "not being the right move"?
If you mean "sticking with `connect` for Redux usage in components", we _do_ recommend the hooks API as the default - it's a lot easier to learn and use, especially with TypeScript. Yes, that does mean you don't get the "auto-optimization of re-rendering when parents re-render" that `connect` gives you, but you can get the same result by wrapping your own components in `React.memo()` as needed (which is actually what `connect` uses internally.)
At work we are currently exploring/POCing a migration to RTK to manage state and redux. Something we were planning on doing is converting completely to hooks. This post probably saved us some headache and made me realize that might not be the right move.