I made a state management library for React. It's called simple store.
@BHolmesDev51K followers
79,989 views
35 Comments
Comments from the original post on X (Twitter)

@BHolmesDev
I have a full breakdown on YouTube!
22 likes

@BHolmesDev
The source:
8 likes

@KM_Marques
We don't need "simple" state manager. They already are simple, because it's just a reducer. Wtf is this trend from some developers to always search for "simple" solutions, when the world need expertise, robust and strong software ?
16 likes

@amanat361
Really nice, would be great if getting deeply nested values didn’t require a chain of selects though but rather a way to use one select with an object or comma separated strings maybe
6 likes

@BHolmesDev
We're tracking an issue for this right now! If we support this, I believe we'll use Zustand's arrow function syntax as an alternative. Ex. select(store => store.deeply.nested.value)
12 likes

@IsNotBlank
Or use Solid with signals.
6 likes

@bossadizenith
I really love your approach on this. thanks for building and sharing.
2 likes

@quantizor
If I may, subscribe returning a tuple of current value and unsubscribe might save people a bit of effort
2 likes

@jsontsx
thank you for the tutorial @code_cowboy cc @kevfaveri
1 like

@x_sp_x
But why? Aren't there already a tons of state management solutions?
1 like

@nemuksis
What happens if you have side effects, e.g., `meta: { contentLength: number }` which is the length of the `content` store value? Is there any way to handle those types of effects?
1 like

@BHolmesDev
That sounds like derived values. I'd suggest generating those in your component instead of putting on the store directly. You can also hack it using subscribe: =>
1 like

@tony_ohagan
Just walk over to Vue and use Pinia stores and all this subscribe complexity disappears. MVVM is so much simpler with right reactivity model.
1 like

@mejanul_haque
I honestly don't get why people use zustand instead of jotai. some people just blindly follows other devs. you are using a library to write less code, not to write the same amounts of code. this is not a redux era.
1 like

@PavitraGolchha
this is nanostores
1 like

@kerematam
I like this work but if the selling point of this is being simple, then I think the only thing that really needs fixing in Zustand is type inference. Anything beyond that doesnt add simplicity, it just forces new patterns onto devs (which is fine, but i would nto call it "simple" anymore).
1 like

@el_alien
Does it have a website? That’s how I judge state management tools. Redux review is… designed with Bootstrap 4. Zustand, that one is good!

@niall_obrien
Looks neat, does it also support hydration for SSR much like Jotai?

@verioussmith
That's nice

@kirillrod_
Valtio solved this… go check it out it’s goated














