10 releases
0.3.0 | May 19, 2021 |
---|---|
0.2.3 | Aug 15, 2020 |
0.2.1 | Jul 31, 2020 |
0.1.4 | Jul 30, 2020 |
#6 in #predictable
23 downloads per month
73KB
1.5K
SLoC
reactive-state
This library is inspired by redux, and designed to be used within Rust GUI applications to manage centralised global state which behaves in a predictable way.
Usage
Optional Features
The following optional crate features can be enabled:
"simple_logger"
- Logging middleware in thesimple_logger
module which uses thelog
macros."web_logger"
- Logging middleware in theweb_logger
module, for applications running in the browser using wasm-bindgen."yew"
- Support for compatibility trait implementations on yew types.
Middleware
The behaviour of the system is customisable via middleware, and provided in this library are a couple of examples, a simple logger, and a web based logger inspired by redux-logger.
The web_logger
Middleware
Available Middleware
Aside from the built in middleware web_logger
and simple_logger
(available via crate features), here is a list of available middleware crates:
switch-router-middleware
- Routing middleware for reactive-state, which makes use of switch-router.
Dependencies
~0–3MB
~54K SLoC