Skip to content

bigfishjs/parva

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 2, 2018
51d230a Β· Mar 2, 2018

History

13 Commits
Mar 2, 2018
Mar 2, 2018
Mar 2, 2018
Feb 23, 2018
Mar 2, 2018
Mar 2, 2018

Repository files navigation

Parva is a react data state management tool, you only need to define and modify your data, all changes follow the "immutable data".

const state = {
  a: 1,
  list: ['a', 'b'],
  obj: {
    a: 1,
    b: 2,
    c: 3,
  },
};
const proxyState = parva({
  target: state,
  onChange: (nextState) => {
    console.log(nextState.list); //  ['a', 'b', 'x']
    console.log(nextState.obj === state.obj) // true; 
  },
});

proxyState.list.push('x');

Browser Support

es6 https://caniuse.com/#search=proxy

About

Parva is a data state management tool.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published