parva

    1.4.0 • Public • Published

    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

    Keywords

    none

    Install

    npm i parva

    DownloadsWeekly Downloads

    9

    Version

    1.4.0

    License

    none

    Unpacked Size

    19.3 kB

    Total Files

    14

    Last publish

    Collaborators

    • zinkey