- Notifications
You must be signed in to change notification settings - Fork8
⚡ A Molecular State Engine for React
License
Omnistac/zedux
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Molecular State Engine for React.
Note
Zedux v2 is right around the corner! This readme has been updated for v2, and the docs are steadily getting there. Despite documentation being sparse, it's highly recommended that new projects use the latest stable v2 release candidate. Refer to thev2 migration guide for a v2 quick start.
Zedux is a multi-paradigm state management tool that features a powerful signals implementation wrapped in a DI-driven atomic architecture.
npm install @zedux/react# npmyarn add @zedux/react# yarnpnpm add @zedux/react# pnpm
The React package (@zedux/react
) contains everything you need to use Zedux in a React app - thecore atomic model and all React-specific APIs.
@zedux/react
has a peer dependency on React. It has partial support for React 18, but primarily supports React 19 and up.
We borrowed ideas from dozens of state management tools over the past 5 years, invented a few ourselves, and put it all together in one powerhouse of a state management library.
Think of Zedux as a cross between React Query, Valtio, and Recoil/Jotai + Bunshi. It's both a cache manager and a normal state manager with real Dependency Injection, rich events, opt-in mutation proxying, and an extension model patterned after React itself.
Sound complex? Zedux is actually very beginner-friendly. In fact, here's all you need to begin:
import{atom,useAtomState}from'@zedux/react'constgreetingAtom=atom('greeting','Hello, World!')functionGreeting(){const[greeting,setGreeting]=useAtomState(greetingAtom)return(<inputonChange={event=>setGreeting(event.target.value)}value={greeting}/>)}
We'll break down this example and so much more inthe docs.
To embark on the journey of mastering Zedux, jump intothe quick start.
If you prefer something more high-level,the introduction's a decent place to start. Or if you want to learn Everything Everywhere All at Once, theAPI docs orrepo source code and tests are real page-turners.
Happy coding!
Contributions an any level are absolutely welcome! Have a look at thecontribution guidelines.
Bugs can be reportedhere.
Questions, feature requests, ideas, and links to cool projects or examples are always welcome in thediscussions page.
TheMIT License.
About
⚡ A Molecular State Engine for React
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.