Releases: recruit-tech/location-state
@location-state/[email protected]
@location-state/[email protected]
Minor Changes
-
9e87052: Add constructor overloads to
StorageStore.The constructor now supports two formats:
-
Recommended format:
new StorageStore()- usessessionStorageby defaultnew StorageStore({ storage?, stateSerializer? })- options object pattern
-
Legacy format (maintained for backward compatibility):
new StorageStore(storage, stateSerializer?)
Existing code will continue to work without any changes.
-
-
196698d: Fixed an issue where state was being discarded even when the user attempted to save it using
useEffecton initial render. -
12faec0: Add
maxKeysoption to StorageStore constructor to limit stored location keys. When the limit is exceeded, oldest keys are automatically removed using LRU strategy. Use the options format for configuration.// Note: The
maxKeysoption is only supported in the recommended options format, not in the legacy constructor format.// Recommended format only support const store = new StorageStore({ maxKeys: 10 });
-
bb35a14: Added
useLocationGetKey()hook for getting the current location key without re-rendering.Deprecated arguments for
useLocationKey()hook. -
07e545e: Add
storeNamein StorageStore's parameter to customize the name used for storage keys. -
9e605ad: Adjusted it so that location-state's
useEffectis executed before children'suseEffect. This resolves race condition issues and achieves more stable state synchronization.
Patch Changes
- 5c6edfe: Prevent React warnings when using
useLocationKey()with the Next.js App Router. ResolveuseInsertionEffecterrors innext devby applying aqueueMicrotaskworkaround.
@location-state/[email protected]
@location-state/[email protected]
@location-state/[email protected]
Patch Changes
- Updated dependencies [b6cd496]
- @location-state/[email protected]
@location-state/[email protected]
Patch Changes
- b6cd496: Fix @location-state/conform types: strict check.
@location-state/[email protected]
Patch Changes
- b6cd496: Fix @location-state/conform types: strict check.
@location-state/[email protected]
Patch Changes
- @location-state/[email protected]
@location-state/[email protected]
@location-state/[email protected]
@location-state/[email protected]
Patch Changes
- 1b1a8d5: Fixed 404 error for internal package dependencies.
@location-state/[email protected]
Patch Changes
- Updated dependencies [518d0ae]
- @location-state/[email protected]