astoilkov/use-local-storage-state
 Watch   
 Star   
 Fork   
2026-07-16 18:35:22
use-local-storage-state

v20.0.0

  • 🐛 isPersistent remains true when localStorage is disabled in Firefox, resolve #80 b1b1dae
  • ✨ reduce bundle size f324d84
v19.5.0 v20.0.0 Δ
minified 1.65 kB 1.53 kB −120 B (−7.3%)
minified + brotli 704 B 677 B −27 B (−3.8%)

Note: This is a new major release because the isPersistent prop is changing behavior — previously when the defaultValue was equal to the returning value isPersistent was always true. Now isPersistent is true only when localStorage is saving the value.


https://github.com/astoilkov/use-local-storage-state/compare/v19.5.0...v20.0.0

2024-11-13 19:18:03
use-local-storage-state

v19.5.0

  • ✨ new defaultServerValue option — setting this will provide a different value while server-rendering and hydrating bfc68fa
    • thanks to @BatuhanTopcu for the PR!

https://github.com/astoilkov/use-local-storage-state/compare/v19.4.1...v19.5.0

2024-10-10 15:43:47
use-local-storage-state
2024-10-10 15:41:52
use-local-storage-state

v17.4.0

  • 🔀 loosen up peer dependencies version range, resolve #70 a53b54e

https://github.com/astoilkov/use-local-storage-state/compare/v17.3.0...v17.4.0

2024-08-08 14:33:12
use-local-storage-state

v19.4.0

  • 🐛 removeItem() reference isn't stable — #69 thanks @iamkd 2c604b2

https://github.com/astoilkov/use-local-storage-state/compare/v19.3.1...v19.4.0

2024-06-12 18:07:22
use-local-storage-state
2024-06-06 16:21:38
use-local-storage-state

v19.3.0

  • ✨ 🐎 better performance — don't re-render when localStorage is holding the defaultValue 010a16e
  • ✨ 🐎 smaller bundle size 81d2603 5b2cf891e890168935e10b559486a6973a0abd49 b2d9e0caba1f9bea619b149fea64f01bd54ff04d
  • ✅ new tests 96369f8952ad43df0bcf880e2897100fefa88c7a 010a16e3e0adef0ea07d02365c3d82bbaa3780e9 81d26038964611c90e5622b7329019c94887cafc

Here's a visual of how bundle size for use-local-storage-state has changed over time:

https://github.com/astoilkov/use-local-storage-state/compare/v19.2.0...v19.3.0

2024-03-26 20:03:46
use-local-storage-state
2023-09-19 15:27:42
use-local-storage-state

19.1.0

  • 🐛 defaultValue option is not provided in IntelliSense 5e83634
  • ♻️ transition from Jest → Vitest b5e0c56

https://github.com/astoilkov/use-local-storage-state/compare/v19.0.4...v19.1.0

2023-08-16 19:06:32
use-local-storage-state