global state management for dioxus built on the concept of atoms. currently under πŸ—

Related tags

Command-line fermi
Overview

Fermi: A global state management solution for Dioxus, inspired by Recoil.Js

Fermi provides primitives for managing global state in Dioxus applications. Heavily inspired by Recoil.Js, Fermi uses the concepts of atoms and selectors to easily refactor local state into global state.

// First, we define an atom of our global state
static Name: Atom<String> = |_| "Dioxus".to_string();

fn app(cx: Scope) -> Element {      
    // then we read it
    let name = use_read(&cx, Name);

    cx.render(rsx!{
        h1 { "Hello, {name}"}
    })
}

fn Child(cx: Scope) -> Element {
    // and then we can read or write it from anywhere in our app
    let set_name = use_set(&cx, Name);

    cx.render(rsx!{
        button { 
            onclick: move |_| set_name(random_name()),
            "Click to set a random name"
        }
    })
}

Fermi is currently under construction, so you have to use the master branch to get started.

[depdencies]
fermi = { git = "https://github.com/dioxuslabs/fermi" }

Broadly our feature set to required to be released includes:

  • Support for Atoms
  • Support for Atom Families
  • Support for memoized Selectors
  • Support for memoized SelectorFamilies
  • Support for UseFermiCallback for access to fermi from async
You might also like...
A simple program that provides DBus interface to control display temperature and brightness under wayland without flickering

wl-gammarelay-rs Like wl-gammarelay, but written in rust, runs on a single thread, has three times less SLOC and uses DBus (for simplicity). Dbus inte

Just a simple object renderer, written in under 500 lines using Rust.
Just a simple object renderer, written in under 500 lines using Rust.

All cargoes that the project runs are: bitflags: a crate for defining bitflag types cfg-if: a small macro crate for defining cfg-based - conditional c

Most intuitive global cli maker. *(lazy_static + config-rs + clap)

argone Most intuitive global cli maker. *(lazy_static + config-rs + clap) | Examples | Docs | Latest Note | [dependencies] argone = "0.5" Phases Parsi

πŸš€ A blazingly fast easy to use dotfile and global theme manager written in Rust
πŸš€ A blazingly fast easy to use dotfile and global theme manager written in Rust

GTHEME A blazingly fast easy to use dotfile and global theme manager for *NIX systems written in Rust πŸ”₯ Demo using wip desktop. To check out more des

Advent of Code 2023 solutions - #15 on global leaderboard

My solutions for Advent of Code 2023, written in Rust. The code requires Rust nightly to run. Sample inputs from each day are provided. To run with ac

Deploy dioxus-web to Vercel.

Dioxus demo This demo shows how to use Dioxus to build a static web application and deploy it to Vercel. Local development To run the demo locally, yo

Make data-driven table rendering easy with Dioxus

Dioxus Table Make data-driven table rendering easy with Dioxus Installation Until the next release of Dioxus this requires Dioxus nightly from git. Th

An html macro for dioxus applications.

dioxus html macro This crate offers an html! like macro for dioxus applications. It expands to the equivalent rsx! macro call you would have made othe

A library to provide abstractions to access common utilities when developing Dioxus applications.

🧰 Dioxus Standard Library πŸš€ A platform agnostic library for supercharging your productivity with Dioxus. dioxus-std is a Dioxus standard library tha

Owner
Dioxus
An elegant GUI library for Rust, inspired by React. Supports Web, Desktop, SSR, Liveview, and Mobile.
Dioxus
Rustato: A powerful, thread-safe global state management library for Rust applications, offering type-safe, reactive state handling with an easy-to-use macro-based API.

Rustato State Manager A generical thread-safe global state manager for Rust Introduction β€’ Features β€’ Installation β€’ Usage β€’ Advanced Usage β€’ Api Refe

BiteCraft 8 Sep 16, 2024
Fully-typed, async, reusable state management and synchronization for Dioxus 🧬

dioxus-query ?? ⚑ Fully-typed, async, reusable state management and synchronization for Dioxus ??. Inspired by TanStack Query. ⚠️ Work in progress ⚠️

Marc EspΓ­n 9 Aug 7, 2023
Open source email client written in Rust and Dioxus. Under πŸ—οΈ

Blazemail A full-featued, beautiful, mail client that doesn't suck. Works on mac, windows, linux, mobile, web, etc. Features, status Blazemail is curr

Jon Kelley 13 Dec 19, 2022
Execute Javascript code in the Dioxus, and get the return value ( for Dioxus )

Golde Dioxus Execute Javascript code in the Dioxus, and get the return value. This demo can help use Javascript to calc the + operator formula. use di

YuKun Liu 15 Dec 27, 2022
A template for starting a dioxus project to be used with dioxus-cli

A template for starting a dioxus project to be used with dioxus-cli

Dioxus 6 Nov 25, 2022
Leptos Query - a robust asynchronous state management library for Leptos,

Leptos Query is a robust asynchronous state management library for Leptos, providing simplified data fetching, integrated reactivity, server-side rendering support, and intelligent cache management.

Nico Burniske 5 Jul 24, 2023
This is a `Rust` based package to help with the management of complex medicine (pill) management cycles.

reepicheep This is a Rust based package to help with the management of complex medicine (pill) management cycles. reepicheep notifies a person(s) via

Daniel B 24 Dec 13, 2023
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
A lightweight and super fast cli todo program written in rust under 200 sloc

todo A lightweight and super fast cli todo program written in rust under 200 sloc installation AUR package: todo-bin use cargo build --release to comp

sioodmy 243 Dec 24, 2022
Cross-platform CLI Rimworld Mod manager. Still under development

rwm Inspired by Spoons rmm. This is a cross-platform Mod Manager for RimWorld intended to work with macOS, linux and Windows Up to now, you must have

Alejandro O 7 Sep 5, 2022