nanostores
valtio

nanostores | valtio | |
---|---|---|
20 | 52 | |
6,314 | 9,709 | |
1.9% | 0.9% | |
7.6 | 8.8 | |
about 1 month ago | 10 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nanostores
-
Using nanostores in Astro + Vue setup
use a shared state manager like nanostores
- Nanostores: A tiny (286 bytes) state manager for React/RN/Preact/Vue/Svelte
-
Building jargons.dev [#2]: The Dictionary Search Engine
I retrieved access to files the directory of words using the Astro.glob() function super easily (too bad I couldn't talk about how powerful this function is; how glad I am it existed out-the-box in Astro and how much ease it brought into the flow of getting this search engine up and running) and plugged the returned array of word objects into a $dictionary state (maybe I should call this a store) powered by nanostore (another beautiful stuff right there)
-
Astro.js as an alternative to Next.js: pushing the limits
In its docs, Astro recommends nanostores, but Iāve used effector in the past. And LOVED IT. So Iāve used it for this project as well.
-
React roadmap ( with explanations and resources, all in one place)
Nanostores explanation
-
How to Write a Great Readme
vidstack is very light on technical details but starts with a concise intro and a screenshot, as well as relevant links: https://github.com/vidstack/player
payload is well-structured in general: https://github.com/payloadcms/payload
nanostores starts out with an intro and telling code examples, followed by lots of technical details: https://github.com/nanostores/nanostores
-
Is redux and thunks still used or are there other alternatives for it now?
Nanostores and Reatom are also great, fast atomic libs
-
Is it possible to build a āframework agnosticā library like tanstack table?
Astro handles multi-framework components (React, Vue, etc) and they recommend using the nanostores library for shared state.
-
how to share state between components with distant shared parent?
Checkout Nanostore it's what Astro.build recommends for sharing state across different ui libraries.
-
Building a multi-framework dashboard with Astro
All of these are valid ways of fixing the state management issue, but it's clear that we need to find a common solution that works for all the UI libraries. This is where nanostores comes into play! The description they provide on their GitHub page is simply perfect:
valtio
-
Show HN: Aberdeen ā An elegant approach to reactive UIs
Oh.. yeah, the proxy part does look really familiar! :-)
Also, their use of promises looks interesting: https://github.com/pmndrs/valtio?tab=readme-ov-file#suspend-... -- I might borrow some ideas from that... :-)
-
Creating a library for both React and Vue š¤
I explored libraries like Valtio and Mitosis, but neither fit perfectly. I didnāt want to add a peer dependency for Valtio, and Mitosis didnāt work well with a shared context.
-
React v19 has been released
The people behind Jotai also made Zustand and Valtio:
https://github.com/pmndrs/zustand
https://github.com/pmndrs/valtio
To me it feels like Jotai has too much manual boilerplate and Valtio has a lot of "magic" that while I do like it I don't feel like it would be a good idea for a team. Zustand sits right in the middle of boilerplate-vs-magic, and is what I chose for a large project we're doing now.
-
Supabase uses Valtio for its state management
As I was reading the Supabase source code for āfunā, I came across a package named Valtio.
- 5 Alternatives to Redux for React State Management
- How to properly structure a valtio shared state object?
-
Changelog #0023 ā š ļø Internal refactoring and improvements
We took inspiration from the many frameworks we worked with throughout our careers. And maybe surprisingly, Djangoās ORM layer impacted our design choices and the API quite a bit. The resulting framework relies on Zod for schemas and validation and Valtio for React integration.
-
Is redux and thunks still used or are there other alternatives for it now?
Valtio is like simplified MobX
-
Why is building a UI in Rust so hard?
Even simpler than Zustand are state-atom libraries like jotai or recoil, or proxy based ones like valtio. Here's some discussion about the differences.
-
How to implement state management inside a simple JavaScript app
There is a package developed around this proxy concept called Valtio which is available for JavaScript, React, and so on... feel free to check and star it on Github.
What are some alternatives?
jotai - š» Primitive and flexible state management for React
MobX - Simple, scalable state management.
effector-react - Business logic with ease āļø
redux - A JS library for predictable global state management
tsm - TypeScript Module Loader
