Lacspace
Loading
@lacspace/store is a Zustand-style global store built on React's `useSyncExternalStore`, with persistence built in. It gives you the same create-a-store-and-select-from-it model in a zero-dependency package that shares conventions with the rest of the Lacspace React kit.
| Feature | @lacspace/store | Zustand |
|---|---|---|
| Dependencies | ·Zero | Zero |
| API style | ·create(store) + selector hook | create(store) + selector hook |
| Built on useSyncExternalStore | ·Yes | Yes |
| Persistence | Built in | Via middleware |
| SSR-safe | ·Yes | Yes |
| Part of one ecosystem | Yes — pairs with query, hooks, theme | Standalone |
| Licence | ·Lacspace Free Licence (MIT-equivalent) | MIT |
Zustand is excellent and battle-tested. Reach for @lacspace/store when you want that same minimal model plus built-in persistence, from the same toolkit as your hooks and data layer.
Yes — persistence to storage is built in, so you don't need a separate middleware to keep state across reloads.
Yes. You create a store and select slices from it with a hook, the same mental model, in a zero-dependency package.