Fermi is a global state management solution for Dioxus that's as easy as use_state
.
Inspired by atom-based state management solutions, all state in Fermi starts as an atom
:
static NAME: = Atom;
From anywhere in our app, we can read the value of our atom:
We can also set the value of our atom, also from anywhere in our app:
If needed, we can update the atom's value, based on itself:
static COUNT: = Atom;
It's that simple!
Installation
Fermi is currently under construction, so you have to use the master
branch to get started.
[]
= { = "https://github.com/dioxuslabs/dioxus" }
Running examples
The examples here use Dioxus Desktop to showcase their functionality. To run an example, use
Features
Broadly our feature set required to be released includes:
- Support for Atoms
- Support for AtomRef (for values that aren't
Clone
) - Support for Atom Families
- Support for memoized Selectors
- Support for memoized SelectorFamilies
- Support for UseFermiCallback for access to fermi from async