[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M782CJQGP7739WA9BS801HZP":3,"skill-same:01M782CJQGP7739WA9BS801HZP":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M782CJQGP7739WA9BS801HZP","react-persist",null,"Gate React UI on Persist hydration with useHydrated + toHydrationSignal. Use when avoiding flash of default state on async backends (IndexedDB), SSR snapshot true, or wiring HydrationSignal into React 18\u002F19.","stainless-code\u002Fpersist","stainless-code","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F188862219?v=4","01M7826VYMCF2NTQWQZRWQ454T","STAINLESS CODE","01M7826VZKNC149Y9ZNK0F93N7",5,"MIT","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Freact-persist\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: react-persist\ndescription: Gate React UI on Persist hydration with useHydrated + toHydrationSignal. Use when avoiding flash of default state on async backends (IndexedDB), SSR snapshot true, or wiring HydrationSignal into React 18\u002F19.\nlicense: MIT\nmetadata:\n  type: framework\n  library: \"@stainless-code\u002Fpersist\"\n  library_version: \"0.4.1\"\n  framework: \"react\"\nrequires:\n  - persist\nsources:\n  - stainless-code\u002Fpersist:src\u002Fadapters\u002Fframeworks\u002Freact.ts\n  - stainless-code\u002Fpersist:docs\u002Farchitecture.md\n---\n\n# React hydration gate\n\n`@stainless-code\u002Fpersist\u002Fframeworks\u002Freact` exports `useHydrated(signal)` — a thin `useSyncExternalStore` wrapper over `HydrationSignal`. It does **not** persist state; pair it with a `.\u002Fsources\u002F*` adapter (`persist-zustand`, `persist-tanstack-store`, …).\n\n## When to use this skill\n\n- Async backend (IndexedDB) — gate UI until hydrate settles.\n- SSR — server snapshot is always `hydrated: true` (nothing to wait for server-side).\n- `null` \u002F `undefined` signal → treat as hydrated (no persistence configured).\n\n## Install\n\n```bash\nbun add @stainless-code\u002Fpersist react\n```\n\n`react` `^18 || ^19` is the optional peer of `\u002Fframeworks\u002Freact`.\n\n## Minimal wiring\n\n```ts\n\u002F\u002F store module\nimport { toHydrationSignal } from \"@stainless-code\u002Fpersist\";\nimport { persistStore } from \"@stainless-code\u002Fpersist\u002Fsources\u002Fzustand\";\n\nconst persist = persistStore(store, { name: \"app:prefs:v1\", storage });\nexport const prefsHydration = toHydrationSignal(persist);\n```\n\n```tsx\n\u002F\u002F component\nimport { useHydrated } from \"@stainless-code\u002Fpersist\u002Fframeworks\u002Freact\";\n\nconst { hydrated } = useHydrated(prefsHydration);\nconst prefs = useStore(store); \u002F\u002F your selector — not from useHydrated\nif (!hydrated) return \u003CSkeleton \u002F>;\nreturn \u003CPrefsView prefs={prefs} \u002F>;\n```\n\n## Contracts\n\n- Return shape is **only** `{ hydrated: boolean }` — read state via your store's selector.\n- Gates **UI flash**, not store reads; pre-hydration `getState()` can still see defaults.\n- Sync backends settle in a microtask; module-load stores usually hydrate before first paint, but `useHydrated` is still the safe read.\n\n## Common mistakes\n\n- **Treating `useHydrated` as the state source.** It only reports the gate.\n- **Expecting `hydrated: false` on the server.** SSR snapshot is `true`.\n- **Forgetting `toHydrationSignal(persist)`.** Pass a `HydrationSignal`, not `PersistApi`.\n- **Assuming `null` signal means “loading”.** It means “no persist” → hydrated.\n\n## API surface\n\n- `useHydrated(signal: HydrationSignal | null | undefined) → { hydrated: boolean }`\n- Core helper: `toHydrationSignal(persist)` from `@stainless-code\u002Fpersist`\n\nSee also: the matching `persist-*` source skill for your store.\n","# React hydration gate\n\n`@stainless-code\u002Fpersist\u002Fframeworks\u002Freact` exports `useHydrated(signal)` — a thin `useSyncExternalStore` wrapper over `HydrationSignal`. It does **not** persist state; pair it with a `.\u002Fsources\u002F*` adapter (`persist-zustand`, `persist-tanstack-store`, …).\n\n## When to use this skill\n\n- Async backend (IndexedDB) — gate UI until hydrate settles.\n- SSR — server snapshot is always `hydrated: true` (nothing to wait for server-side).\n- `null` \u002F `undefined` signal → treat as hydrated (no persistence configured).\n\n## Install\n\n```bash\nbun add @stainless-code\u002Fpersist react\n```\n\n`react` `^18 || ^19` is the optional peer of `\u002Fframeworks\u002Freact`.\n\n## Minimal wiring\n\n```ts\n\u002F\u002F store module\nimport { toHydrationSignal } from \"@stainless-code\u002Fpersist\";\nimport { persistStore } from \"@stainless-code\u002Fpersist\u002Fsources\u002Fzustand\";\n\nconst persist = persistStore(store, { name: \"app:prefs:v1\", storage });\nexport const prefsHydration = toHydrationSignal(persist);\n```\n\n```tsx\n\u002F\u002F component\nimport { useHydrated } from \"@stainless-code\u002Fpersist\u002Fframeworks\u002Freact\";\n\nconst { hydrated } = useHydrated(prefsHydration);\nconst prefs = useStore(store); \u002F\u002F your selector — not from useHydrated\nif (!hydrated) return \u003CSkeleton \u002F>;\nreturn \u003CPrefsView prefs={prefs} \u002F>;\n```\n\n## Contracts\n\n- Return shape is **only** `{ hydrated: boolean }` — read state via your store's selector.\n- Gates **UI flash**, not store reads; pre-hydration `getState()` can still see defaults.\n- Sync backends settle in a microtask; module-load stores usually hydrate before first paint, but `useHydrated` is still the safe read.\n\n## Common mistakes\n\n- **Treating `useHydrated` as the state source.** It only reports the gate.\n- **Expecting `hydrated: false` on the server.** SSR snapshot is `true`.\n- **Forgetting `toHydrationSignal(persist)`.** Pass a `HydrationSignal`, not `PersistApi`.\n- **Assuming `null` signal means “loading”.** It means “no persist” → hydrated.\n\n## API surface\n\n- `useHydrated(signal: HydrationSignal | null | undefined) → { hydrated: boolean }`\n- Core helper: `toHydrationSignal(persist)` from `@stainless-code\u002Fpersist`\n\nSee also: the matching `persist-*` source skill for your store.\n",{"name":5,"license":15,"sources":24,"metadata":27,"requires":32,"description":7},[25,26],"stainless-code\u002Fpersist:src\u002Fadapters\u002Fframeworks\u002Freact.ts","stainless-code\u002Fpersist:docs\u002Farchitecture.md",{"type":28,"library":29,"framework":30,"library_version":31},"framework","@stainless-code\u002Fpersist","react","0.4.1",[33],"persist","main","29ca2183c92cd13e04ce6c14fb431fd6993862cd","skills\u002Freact-persist",0,"https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist","https:\u002F\u002Fgithub.com\u002Fstainless-code","https:\u002F\u002Fstainless-code.com\u002F","Open-source tooling for JS\u002FTS and AI agents.","2026-11-01 20:56:20",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add stainless-code\u002Fpersist --skill react-persist",{"tool":49,"command":50},"bunx","bunx skills add stainless-code\u002Fpersist --skill react-persist",{"tool":52,"command":53},"pnpm","pnpm dlx skills add stainless-code\u002Fpersist --skill react-persist","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Freact-persist\u002FSKILL.md",true,[],[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M782D4ZQGJPNT470FSKDB6A8","vue-persist","Gate Vue 3 UI on Persist hydration with useHydrated (shallowRef). Use in setup\u002FeffectScope when avoiding flash of default state on async backends.","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Fvue-persist\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M782D1GJRWNQ3458F3H1FK2F","svelte-store-persist","Gate Svelte store-based UI on Persist hydration with hydratedStore (Readable). Use for Svelte 3–4 or Svelte 5 apps that still use stores; runes UI → svelte-persist.","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Fsvelte-store-persist\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M782CWBTRWAQ52TBNQ8665CC","svelte-persist","Gate Svelte 5 runes UI on Persist hydration with hydratedRune (.current). Use for Svelte 5; for stores \u002F Svelte 3–4 use svelte-store-persist.","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Fsvelte-persist\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M782CR8Z2V3SJW661RTMWY2F","solid-persist","Gate Solid UI on Persist hydration with useHydrated (Accessor). Use when avoiding flash of default state on async backends; read hydrated() in reactive scopes.","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Fsolid-persist\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M782CF96RMXCDETM5TF2JDRV","preact-persist","Gate Preact UI on Persist hydration with useHydrated (preact\u002Fcompat useSyncExternalStore). Use when avoiding flash of default state on async backends or wiring HydrationSignal into Preact.","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Fpreact-persist\u002FSKILL.md",[],[],{"skillNo":94,"name":33,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M782CBFRVHCK44ZZPAV06VQM","Core @stainless-code\u002Fpersist concepts — persistSource, PersistOptions, PersistApi, hydration gate, throttle, cross-tab, migrate. Load before framework hydration skills or when wiring a custom PersistableSource.","https:\u002F\u002Fgithub.com\u002Fstainless-code\u002Fpersist\u002Fblob\u002Fmain\u002Fskills\u002Fpersist\u002FSKILL.md",[],[]]