Skip to content

Version 4.7.0

Compare
Choose a tag to compare
@bluebill1049 bluebill1049 released this 17 Sep 00:58
· 13 commits to master since this release
  • introduce persist none option which you can skip saving data into session storage and this package can be use with React Native with this config set to none as well
createStore(
  {
    yourDetail: { firstName: '', lastName: '' } // it's an object of your state
  },
  {
     // when 'none' is used then state is not persisted
     // when 'action' is used then state is saved to the storage after store action is completed
     // when 'beforeUnload' is used then state is saved to storage before page unload and is restored
     // after next page load and then storage is cleared
     persist?: 'action' // onAction is default if not provided
  },
);

huge thanks to @snax4a