1.1.2 • Published 6 years ago
barfijs v1.1.2
Sweetest😋 and Simplest way to manage your state.
barfijs
is a simple JavaScript global state manager.
Installation
Use the JavaScript package manager NPM or Yarn to install barfijs
NPM
npm install barfijs
Yarn
yarn add barfijs
Usage
Store
Barfi Store
import { BarfiStore } from "barfijs";
const store = BarfiStore(); // access whole store
PUT state
PutState function used to create or update state.
import { PutState } from "barfijs";
PutState(propertyName, value, callback([value, store])); // create state
PutState(propertyName, newValue, callback([updatedvalue, store])); // update state
GET state
GetState function used to retrieve a state.
import { GetState } from "barfijs";
const state = GetState(propertyName);
DELETE state
DeleteState function used to delete a state.
import { DeleteState } from "barfijs";
const state = DeleteState(propertyName, callback([deletedValue, store]));
Contributing
Pull requests are welcome. For major and minor changes and bugs, please open an issue first to discuss what you would like to change and about fixing bug/s.