jstate
v1.0.0
Published
Very friendly Flux implementation
Downloads
3
Maintainers
Readme
jState
jState is a very friendly Flux implementation. Nowadays there are many libraries that do this implementation and do it with a great success, each characterized by certain characteristics, emphasis certain parameters and has a strong link to other libraries. jState primarily emphasizes complexity, this means that it has a very short and focused API, it is super easy to integrate with all the newest FE libraries and it takes almost no time to get started with.
Installation
$ npm i -S jstate
$ yarn add jstate
Quick start
<script src="./node_modules/jstate/dist/jstate.min.js"></script>
<script src="https://cdn.rawgit.com/rannn505/jstate/master/dist/jstate.min.js"></script>
// open console (F12)
const logger = next => action => {
next(action);
// $._ is shorthand to jstate.state
console.log($._);
}
$.register(logger);
// all of jState API is accessible via $ or jstate prefixes
jstate.setState({a:1});
$.setState({a:2, b:3});
API Reference
:memo: API reference I've created a convenient and readable page, so you can enjoy the experience of learning and begin to use the library quickly and easily.