lil-store
My naive approach to create a state management library.
Inspired by Redux, Vuex and Flux architecture.
Install
npm install lil-store
How to use
In all seriousness, just read the code. It's less than 30 lines!
const createStore = const reducer = { if !store store = 0 // this is how you define your initial state return store} const store = store store // prints out 5store // prints out 6store // prints out 7store // prints out 6
In Browser
Through UNPKG:
An object named lilStore
is exposed to the global Window
object.
You can then access createStore
like so:
Why
State management is not a React/Vue only need!
This library (more like code snippet) allows you to easily create a reactive store for whatever needs you have!
Roadmap
- Export module for browser use
- Publish that to unpkg.com or something
- Add tests
- Implement TravisCI
- Implement code coverage