News for hackers. Stuff that matters.
Re:useStateMachine: A ½ kb state machine hook for React by kabes on Sunday May 23, 2021 @03:38AM (#27253114)
React hooks allows for reusable bits of logic. Reusable bits of logic are a great idea for a UI framework. But react hooks is a terrible implementation of that idea.

You're no longer writing plain javascript, you're writing in some terribly verbose language where everything from variable declarations to function expressions needs to be wrapped, making it hard to integrate with this party APIs and small details can have a big impact on performance.

Both vue 3 and svelte show it can be done better.

There are no comments on this comment yet.