Feature State Hook

Define typed, module-scoped state and wrap useUrlState in a feature-scoped custom hook so unrelated React components share the same URL-synced state. Covers drawer/modal open-state, tab switching, multi-select toggles, reset/defaults semantics, and the object-identity-based sharing model. Load this skill when storing filters, tabs, drawers, selections, paginators, or any UI state that should survive reloads and be shareable by URL, and when a link to another route has to carry that state with it.

asmyshlyaev177 dc20ee4 13.5 KB Updated

File contents

asmyshlyaev177/state-in-url/tree/main/skills/feature-state-hook commit dc20ee4030

Frequently asked questions

npx skillmds@latest add asmyshlyaev177/feature-state-hook