use-persisted-state icon indicating copy to clipboard operation
use-persisted-state copied to clipboard

A custom React Hook that provides a multi-instance, multi-tab/browser shared and persistent state.

Results 48 use-persisted-state issues
Sort by recently updated
recently updated
newest added

Hi, i discovered that using `window.localStorage.clear()` in `beforeEach` has no effect in jest tests. Tried also `global` instead of `window`. https://codesandbox.io/s/2o1ljwjwy0 All test should work because i only click once....

Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. Changelog Sourced from terser's changelog. v4.8.1 (backport) Security fix for RegExps that should not be evaluated (regexp DDOS) Commits See full diff in compare...

dependencies

I had the issue that the persisted value got set to undefined in the local storage. Debugging in chrome showed the key in the localStorage listed, but with value undefined...

The setter function that is returned is not memoized, because it is always changed into a new function at each render (every invoke of the hook).

With React's useState hook, you can call setState multiple times and it will queue the updates, as long as you are passing a function to setState. However, in this library...

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. Changelog Sourced from async's changelog. v2.6.4 Fix potential prototype pollution exploit (#1828) Commits c6bdaca Version 2.6.4 8870da9 Update built files 4df6754 update changelog 8f7f903...

dependencies

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...

dependencies

Happy new year! I would love for this library to also handle reducer use cases. This MR also closes issue #3. I added support for `reducer` as a second argument...

I just migrated my React app from CRA to Vite and this error https://github.com/donavon/use-persisted-state/blob/2a33963050b209f8cc27060a32109978414a4dc7/src/index.js#L7

Snyk has created this PR to upgrade @use-it/event-listener from 0.1.6 to 0.1.7. ![merge advice](https://app.snyk.io/badges/merge-advice/?package_manager=npm&package_name=@use-it/event-listener&from_version=0.1.6&to_version=0.1.7&pr_id=96b64ff6-a0fd-4956-81f2-53ecdd337d31&visibility=true&has_feature_flag=false) :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more...