News for hackers. Stuff that matters.
Re:Algebraic Effects for React Developers by cageface on Monday November 02, 2020 @12:40AM (#24965082)
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.
Re:Algebraic Effects for React Developers by richeyryan on Monday November 02, 2020 @04:21AM (#24966117)
Just 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