Skip to content

hippodippo/avux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Avux


Avux is a work in progress. I will let everyone know when it is completed! Apologies to those who have already downloaded it on npm.

So far Avux allows you to create a store that has 3 methods pre-packaged for manipulating the state.

Methods:


1.) store.getState() - Gets the current state.

2.) store.selectState(['name', 'age']) - Selects only certain props/values from state. Pass an array containing the property names, and selectState will return an object containing those props/values.

3.) store.updateState({favColor: 'White'}) - Updates state by merging the object you pass in.

Example code:


const { createStore } = require('avux');

OR

import { createStore } from 'avux';

const state = { name: 'Kaycee', age: 23 }

const store = createStore(state);

store.getState();
store.updateState({favColor: 'blue'});
store.selectState(['name', 'age']);

About

A super simple state management library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published