Skip to content

feat(hooks): extract usePersist hook from cosmoz-frontend#243

Open
basilgood wants to merge 1 commit into
masterfrom
feature/hooks-extract-use-persist
Open

feat(hooks): extract usePersist hook from cosmoz-frontend#243
basilgood wants to merge 1 commit into
masterfrom
feature/hooks-extract-use-persist

Conversation

@basilgood

Copy link
Copy Markdown
Contributor

Summary

  • Extract usePersist hook from cosmoz-frontend to cosmoz-utils for reuse
  • Hook persists string values to localStorage with cross-tab sync
  • Supports undefined key (disables persistence, acts like regular useProperty)

Files

  • src/hooks/use-persist.ts - New hook
  • test/use-persist.test.ts - Tests

Linked Issue

FE-640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant