What problem does it solve?
This Skill prevents silent runtime failures and broken hooks caused by incorrect Preact imports, missing JSX transform configuration, absent pluginPreact in build/test configs, and duplicate Preact runtimes across Module Federation boundaries in a monorepo.
Core Features & Use Cases
- Enforces correct import sources for hooks, primitives, and compat utilities so components use preact and preact/hooks rather than react.
- Documents architecture rules that separate smart shell responsibilities (stores, providers, routing) from dumb ui-components, ensuring predictable state flow.
- Prescribes build and federation requirements: set jsxImportSource to preact in tsconfig, include pluginPreact() in rsbuild/rslib/rstest configs, and configure Module Federation shares as singletons for preact packages.
- Use cases: writing functional components and hooks, adding forwardRef-compatible components, configuring MF remotes/hosts, auditing packages for duplicate Preact runtimes, and preventing ref+Suspense timing bugs.
Quick Start
Audit and update each package to set jsxImportSource to preact, add pluginPreact() to every rsbuild/rslib/rstest config, and configure preact, preact/hooks, preact/compat, and preact/jsx-runtime as singletons in Module Federation shared settings.