1.4.0 • Published 6 years ago

parva v1.4.0

Weekly downloads
30
License
-
Repository
github
Last release
6 years ago

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

1.4.0

6 years ago

1.2.0

6 years ago

1.0.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago