# donavon/use-persisted-state

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/donavon-use-persisted-state).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

1,372 stars · 93 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/donavon/use-persisted-state
- awesome-repositories: https://awesome-repositories.com/repository/donavon-use-persisted-state.md

## Topics

`custom-hook` `hooks` `localstorage` `persistence` `react` `reactjs`

## Description

Use-persisted-state is a React hook library that persists component state in browser storage and synchronizes updates across multiple tabs and windows. It extends standard component state management by automatically saving values to browser storage providers on every state update, ensuring user data survives page reloads and browser sessions.

The library supports cross-component state sharing by linking multiple distinct component instances to a single storage key so they share and update identical data. It provides factory-generated hook instances that create isolated state functions bound to specific storage backends and serialization strategies, along with custom storage engine adapters that abstract underlying persistence mechanisms behind a generic storage interface.

## Tags

### Data & Databases

- [Storage Persistence Hooks](https://awesome-repositories.com/f/data-databases/state-persistence/browser-storage-persistence/storage-persistence-hooks.md) — Extends standard component state management by transparently persisting values to browser storage providers on every state update.
- [Browser Storage Persistence](https://awesome-repositories.com/f/data-databases/state-persistence/browser-storage-persistence.md) — Save component state to local browser storage so data remains available after closing or reloading the page. ([source](https://github.com/donavon/use-persisted-state/blob/develop/README.md))
- [Storage Backend Adapters](https://awesome-repositories.com/f/data-databases/storage-backend-adapters.md) — Abstracts underlying data persistence mechanisms behind a generic storage interface to support different web storage backends interchangeably.

### User Interface & Experience

- [Browser Local Storage Management](https://awesome-repositories.com/f/user-interface-experience/browser-local-storage-management.md) — Storing component state in local browser storage so user data survives page reloads and browser sessions.

### Web Development

- [Storage Event Synchronization](https://awesome-repositories.com/f/web-development/browser-integration-utilities/browser-apis/browser-storage/cross-instance-sync-storage/storage-event-synchronization.md) — Broadcasts state mutations across independent browser windows using storage event listeners to keep multiple open tabs synchronized in real time.
- [Cross-Window State Synchronizations](https://awesome-repositories.com/f/web-development/cross-window-state-synchronizations.md) — Broadcast state updates across multiple browser tabs and windows so all instances stay automatically aligned. ([source](https://github.com/donavon/use-persisted-state/blob/develop/README.md))
- [Persisted Storage State Hooks](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/component-authoring/react-ecosystem/react-hooks/custom-state-hooks/persisted-storage-state-hooks.md) — Provides a custom React hook that persists component state in browser storage and synchronizes updates across multiple tabs and windows.
- [Cross-Tab Synchronization](https://awesome-repositories.com/f/web-development/state-synchronization/cross-tab-synchronization.md) — Broadcast state changes across open tabs and windows in real time so multiple views stay perfectly aligned. ([source](https://github.com/donavon/use-persisted-state#readme))
- [React Hooks](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/component-authoring/react-ecosystem/react-hooks.md) — Provides a utility hook that links multiple component instances to a shared underlying storage key for synchronized data flow.
- [State Management Libraries](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/component-authoring/react-ecosystem/react-libraries/state-management-libraries.md) — Provides a custom hook that persists component state in browser storage and synchronizes updates across multiple tabs and windows.

### Software Engineering & Architecture

- [Stateful Function Factories](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/functional-state-management/stateful-function-factories.md) — Creates isolated state hook functions bound to specific storage backends and serialization strategies through a factory pattern initialization function.
- [Component Context Sharing](https://awesome-repositories.com/f/software-engineering-architecture/shared-state-management/component-context-sharing.md) — Link multiple hooks to a single storage key so separate components on the same page share the exact same state. ([source](https://github.com/donavon/use-persisted-state/blob/develop/README.md))
