eco-state
v0.0.3
Published
Light Weight Asynchronous JavaScript Eco friendly State Management Library.
Downloads
6
Maintainers
Readme
eco-state
Light Weight Asynchronous JavaScript Eco friendly State Management Library.
Install using npm
npm install -S eco-state
Usage
import { createListeners, registerToUpdate, eventCreator, getCurrentState } from "eco-state";
createListeners('localData', null, (state, action) => {
return {
date: action.payload
}
});
registerToUpdate((sta,,,te) => console.log('new data', state['localData']));
eventCreator('localData', {payload: 423423});
eventCreator('localData', {payload: 454});
console.log('get the state', getCurrentState());
Library development setup
Setup using docker.
Clone the repository.
- Install the Community edition Docker application and, Docker Installation Link
- Install the Docker-Compose application and, Docker-Compose Installation Link
- Once Docker installation setup is done please logut or restart your system.
docker-compose up --build -d
docker exec -it eco_state bash
npm install
Setup manually
Clone the repository
cd eco-state
npm install