Skip to content

1.17.0 - Local Component Stores

Choose a tag to compare

@lostpebble lostpebble released this 01 Oct 15:34
· 63 commits to master since this release

Added useLocalStore() function for allowing the use of pullstate stores to replace regular React.useState() in some scenarios, as local state within your components (non-global state stores).

As extras, you can also call MyStore.useLocalCopyInitial() or MyStore.useLocalCopySnapshot() on any of your stores to create a local component-lifetime copy of those stores- either set to whatever your stores state was initially or a snapshot of what it is at this moment, respectively.