News for hackers. Stuff that matters.
Re:Algebraic Effects for React Developers by unityByFreedom on Sunday November 01, 2020 @07:40PM (#24963887)
> I too can't shake the feeling that hooks are off.

Well the alternative to hooks is componentDidMount, componentDidUpdate, etc. It's a lot easier to sync state and UI when the logic for doing so can be put in one place.

Re:Algebraic Effects for React Developers by ricksharp on Sunday November 01, 2020 @09:30PM (#24964361)
I’ve been using hooks for a year, and they are awesome (once you get used to it). I can write the same component in 1/3 of the code in a functional style.

The debugging story isn’t great if you expect to be able to use breakpoints.

It’s all about putting console.log wherever really.

The beauty comes in the speed of coding, I can move so fast that I always build a mock version of my api layer and can have the entire UI done rapidly.

Re:Algebraic Effects for React Developers by gaoshan on Sunday November 01, 2020 @10:54PM (#24964692)
You can throw in debugging statements (`debugger;`) when some hook doesn't seem to be hitting a breakpoint. Stops things just fine.