https://github.com/kellpossible/reactive-state
A library for managing global application state (similar to redux).
https://github.com/kellpossible/reactive-state
Last synced: 12 months ago
JSON representation
A library for managing global application state (similar to redux).
- Host: GitHub
- URL: https://github.com/kellpossible/reactive-state
- Owner: kellpossible
- License: mit
- Created: 2020-07-28T17:46:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-19T05:12:36.000Z (about 5 years ago)
- Last Synced: 2025-05-13T18:29:27.621Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 256 KB
- Stars: 14
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# reactive-state [](https://crates.io/crates/reactive-state) [](https://docs.rs/reactive-state/) [](https://github.com/kellpossible/reactive-state/blob/master/LICENSE.txt) [](https://github.com/kellpossible/reactive-state/actions?query=workflow%3ARust)
This library is inspired by [redux](https://redux.js.org/), 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 the `simple_logger` module which uses the `log` macros.
+ `"web_logger"` - Logging middleware in the `web_logger` module, for applications running in the browser using [wasm-bindgen](https://crates.io/crates/wasm-bindgen).
+ `"yew"` - Support for compatibility trait implementations on [yew](https://crates.io/crates/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](https://github.com/LogRocket/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`](https://github.com/kellpossible/switch-router-middleware) - Routing middleware for [reactive-state](https://crates.io/crates/reactive-state), which makes use of [switch-router](https://github.com/kellpossible/switch-router).