3 ms·
Hooks have a very nice synergy with Typescript. useEffect can be tricky to get right in some cases but overall a prefer writing in pure components with hooks ov
by cageface 6y ago
Hooks have a very nice synergy with Typescript. useEffect can be tricky to get right in some cases but overall a prefer writing in pure components with hooks over classes.
- richeyryan 6y agoJust a slight nitpick about components with hooks. They are neither pure nor functional. They are function components. We can still have pure components without hooks but function components are no longer pure by default. Its actually one of the downsides of the move to hooks. It used to be very obvious when you needed to worry about state and when you didn't. However the benefits of hooks outweigh that nicety in my opinion