AI logo
AI

reactlynx-best-practices

Teaches agents patterns writing dual-threaded React code with ReactLynx. Includes static analysis rules and auto-fix for common issues:

  • detect-background-only (Critical) — Ensures native API calls (lynx.getJSModule, NativeModules) only happen in background thread contexts, preventing UI blocking.
  • proper-event-handlers — Correct event handler patterns (bindtap, catchtap) and propagation in ReactLynx.
  • main-thread-scripts-guide — How to properly use 'main thread' directive and main-thread: event prefix for smooth animations and gesture handling.
  • hoist-static-jsx — Performance optimization by hoisting static JSX elements outside components to avoid unnecessary re-creation.
Tip

These rules are also documented as a standalone guide. See Best Practices for detailed explanations and code examples.

Installation

npx skills add lynx-community/skills -s reactlynx-best-practices

This adds the skill rules to your project so that compatible coding agents (such as Claude Code, Cursor, or Copilot) can automatically apply them.

Learn More

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.