https://github.com/cvlmtg/monarc
An advanced and extensible store for React applications, MONARC's Obviously Not A Redux Clone
https://github.com/cvlmtg/monarc
flux hooks hooks-api react reactjs redux state-management store typescript
Last synced: 10 months ago
JSON representation
An advanced and extensible store for React applications, MONARC's Obviously Not A Redux Clone
- Host: GitHub
- URL: https://github.com/cvlmtg/monarc
- Owner: cvlmtg
- License: mit
- Created: 2020-04-14T09:40:23.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-02-13T14:00:20.000Z (about 3 years ago)
- Last Synced: 2025-04-19T17:17:53.415Z (10 months ago)
- Topics: flux, hooks, hooks-api, react, reactjs, redux, state-management, store, typescript
- Language: TypeScript
- Homepage: https://cvlmtg.github.io/monarc/
- Size: 1.39 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MONARC 🦋
MONARC's Obviously Not A Redux Clone.
MONARC is a store intended for [React](https://reactjs.org/) applications, based on the new [Context](https://en.reactjs.org/docs/context.html) API and [useContext / useReducer](https://en.reactjs.org/docs/hooks-reference.html#usecontext) hooks.
It can be extended with your own plugins, with a couple included to provide two advanced features: **undo** / **redo** management and **auto-save**. There is also a plugin to connect your application to the [Redux DevTools](https://github.com/reduxjs/redux-devtools). All of these features can be enabled on demand.
MONARC also provides some features to help migrating applications using the [Flux](https://facebook.github.io/flux/) `ReduceStore` / `Container` pattern, so you won't have to rewrite your application from scratch.
[](https://www.npmjs.com/package/monarc)
[](https://www.npmjs.com/package/monarc)
## Installation
MONARC is available as a package on NPM for use with a module bundler.
```bash
# NPM
npm install monarc
# Yarn
yarn add monarc
```
## Motivation
This project was born as an alternative to Facebook's Flux state management. My company's React applications were based on Flux, which uses a deprecated React method that will stop working sooner or later. Since Flux seems no longer actively maintained, it is probably wise to start thinking about an escape path before it's too late.
MONARC has already successfully replaced Flux and is being used in production on old and new applications.
## Documentation
* [Usage](docs/usage.md)
* [Reducer](docs/usage.md#reducer)
* [Undo / Redo](docs/usage.md#withundoredo)
* [Auto-save](docs/usage.md#withautosave)
* [Container](docs/usage.md#container)
* [Hooks](docs/usage.md#hooks)
* [Extending](docs/extending.md)
* [A simple Example](docs/extending.md#a-simple-example)
* [A full fledged plugin](docs/extending.md#a-full-fledged-plugin)
* [Migrating from Flux](docs/migrating.md)
* [Dispatcher](docs/migrating.md#dispatcher)
* [Action creators](docs/migrating.md#action-creators)
* [Store](docs/migrating.md#dispatcher)
* [Reducers](docs/migrating.md#reducers)
* [Container](docs/migrating.md#container)
## TODO
- Improve documentation
- Add a demo application
- More tests!
## Licence
[MIT](LICENSE)