OpenParable
Skip to content
← Back to skills

Reatom Jsx

Development
reatom-jsx

Reatom Jsx is an Agent Skill for development published in the reatom/reatom repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Implements and documents @reatom/jsx — reactive native DOM JSX. Use when writing JSX components, mount/unmount, props (prop:/attr:/on:), css prop, models, refs, SVG, Bind, or TypeScript JSX typings with Reatom.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/reatom/reatom/blob/HEAD/skills/reatom-jsx/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/reatom-jsx, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Reatom JSX

Use this skill when implementing or explaining @reatom/jsx. Treat REFERENCE.md as the canonical reference bundled with this skill.

How to use

  1. Read the relevant sections of REFERENCE.md — do not assume React/Vue JSX semantics (no virtual DOM, no diffing, no component re-renders).
  2. For Reatom core (atoms, wrap, async, routing), use the reatom skill.
  3. For pull requests and skeptic validation, use reatom-review plus this skill for JSX-specific patterns.

Section map

Use this map to open only the relevant parts of REFERENCE.md:

TopicSection
Install, tsconfig, ViteInstallation, Framework compatibility
Bootstrapping the appExample, Hot module replacement
Props, children, bindingsReference → Props, Children, Models
Inline and css-prop stylesReference → style props, style:*, CSS-in-JS
Class namesReference → class or className, reatomClassName
Components and listsReference → Components
Bulk prop bindingReference → $spread
SVG and raw markupReference → SVG
Mount side effectsReference → ref props
UtilitiesUtilities → reatomClassName, css, <Bind>
TypeScriptTypeScript
SSR and keyed listsLimitations

Implementation defaults

  • Components are plain functions evaluated once at mount; use atoms and reactive props for updates.
  • Reads: zero-arg atom call. Writes: .set(...).
  • on:* handlers that touch Reatom state are wrapped automatically; do not wrap manually in JSX.
  • Never reuse a JSX element instance in multiple places — call the component function or factory each time.
  • Plain writable atoms: model:value / model:checked for search, toggles, linked-list row atoms.
  • Real forms: reatomForm from @reatom/core with <form model={form}> and model:field={form.fields.x} — never model:value on field atoms (bypasses field.change).
  • Form submit loader: style [data-submitting] on the form (set automatically by model={form}); CSS-only spinner on [type='submit']::after.
  • For SPA navigation use reatomRoute: links via href={route.path(params)}, programmatic moves via route.go(params) — see the reatom skill Routing section.
  • Use prop:* for DOM properties, attr:* for attributes when semantics matter.
  • Mount with mount(root, <App />); call unmount() on teardown (including Vite HMR).
  • For dynamic lists, store elements in atoms or map inside reactive children — no keyed reconciliation.

When REFERENCE.md and local examples disagree, prefer the reference and fix the example if it is wrong.