reactlynx-best-practices
Installation
SKILL.md
ReactLynx Best Practices
Use this skill when writing, reviewing, or refactoring ReactLynx code. ReactLynx follows the React programming model, but Lynx's dual-thread runtime changes how side effects, lifecycle timing, event handlers, and main-thread scripts should be reasoned about.
This skill intentionally does not require @ast-grep/napi or any native parser at runtime. The bundled scanner is a lightweight heuristic helper for common issues. The agent must still read the code and apply the rule documents in rules/*.md.
When to Apply
- Writing new ReactLynx components or application code.
- Reviewing ReactLynx code for thread-boundary, lifecycle, event, lynx.__globalProps, code-splitting, or performance issues.
- Refactoring code that calls
lynx.getJSModule,NativeModules,runOnMainThread,runOnBackground,lazy,Suspense, oruseLayoutEffect. - Investigating performance traces that include ReactLynx render, diff, commit, patch, or setState events.