eco-state

0.0.3 • Public • Published

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.

  1. Install the Community edition Docker application and, Docker Installation Link
  2. Install the Docker-Compose application and, Docker-Compose Installation Link
  3. 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

Package Sidebar

Install

npm i eco-state

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

17.1 kB

Total Files

23

Last publish

Collaborators

  • ajsuvarna6