What problem does it solve?
Writing documentation for a new ReactUse hook requires creating three locale-specific MDX files (English, Simplified Chinese, Traditional Chinese) that follow a strict content schema, live-demo convention, and category-based routing, plus regenerating the hook registry — a repetitive, error-prone manual process.
Core Features & Use Cases
- Trilingual MDX Generation: Produces matching English, zh-Hans, and zh-Hant documentation files in the correct
packages/website-astro content folders, with proper frontmatter (title, description, sidebar_label).
- Live Demo Convention: Embeds an inline
tsx live code block for an editable demo and preserves the %%API%% placeholder that the build replaces with the generated API table.
- Registry Regeneration: Runs
scripts/generate-hook-registry.sh to rebuild scripts/hook-registry.json so blog and doc links resolve with the correct category and lowercase URL.
- Use Case: After implementing a new
useX hook, ask the assistant to document it — it creates all three locale files under the right category folder (browser, effect, element, state, integrations) and updates the registry.
Quick Start
Ask the assistant to document the new useX hook following the ReactUse docs convention and regenerate the hook registry.