❌ useState ❌ useReducer ✅ State machines
@SandroMaglione5.2K followers
13,420 views
13 Comments
Comments from the original post on X (Twitter)

@DotsonZion
❌ React ✅ Svelte
4 likes

@DavidKPiano
Amen
4 likes

@wadiou_
I've built before a similar thing only for a bit complex animations and it was very helpful,but for simple stuff usestate is more than enough it can be easily validated by agents
1 like

@gabimoncha
i've been sleeping on xstate for too long
1 like

@hot_town
Haha cool.
1 like

@chandra_7852
This is not built for simlar task, just use the useState and move on, i have implemented my state machine but it is only helpful when there is complex components. In my 200K Loc frontend code there is hardly 5 state machine, useState does most of the jobs done

@meowhib
i was thinking the same when i read @mattpocockuk 's post

@rodrigoehlers
How is this related to React if at all?

@prateekkathal
Each one of them have a use of their own. Use them where they apply, don't just ❌ them out.

@SandroMaglione
Nah, I just cross them out, with linting as well

@Rom1_Dev_Sleep
At 0:26 when the SM is idle, and the eg send success For me it should not be possible to allow to send a not available event, and it should be catch at compile time. While the state machine is declarative, the associated event mécanisme is not. That’s promotes unwilling behavior

@ai_tested
Yeah no.. this is much harder to read

@divdotdev
bruh j use effect atom