Reatom Jsx
Developmentreatom-jsxReatom 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.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
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
- Read the relevant sections of REFERENCE.md — do not assume React/Vue JSX semantics (no virtual DOM, no diffing, no component re-renders).
- For Reatom core (atoms, wrap, async, routing), use the
reatomskill. - For pull requests and skeptic validation, use
reatom-reviewplus this skill for JSX-specific patterns.
Section map
Use this map to open only the relevant parts of REFERENCE.md:
| Topic | Section |
|---|---|
| Install, tsconfig, Vite | Installation, Framework compatibility |
| Bootstrapping the app | Example, Hot module replacement |
| Props, children, bindings | Reference → Props, Children, Models |
| Inline and css-prop styles | Reference → style props, style:*, CSS-in-JS |
| Class names | Reference → class or className, reatomClassName |
| Components and lists | Reference → Components |
| Bulk prop binding | Reference → $spread |
| SVG and raw markup | Reference → SVG |
| Mount side effects | Reference → ref props |
| Utilities | Utilities → reatomClassName, css, <Bind> |
| TypeScript | TypeScript |
| SSR and keyed lists | Limitations |
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:checkedfor search, toggles, linked-list row atoms. - Real forms:
reatomFormfrom@reatom/corewith<form model={form}>andmodel:field={form.fields.x}— nevermodel:valueon field atoms (bypassesfield.change). - Form submit loader: style
[data-submitting]on the form (set automatically bymodel={form}); CSS-only spinner on[type='submit']::after. - For SPA navigation use
reatomRoute: links viahref={route.path(params)}, programmatic moves viaroute.go(params)— see thereatomskill Routing section. - Use
prop:*for DOM properties,attr:*for attributes when semantics matter. - Mount with
mount(root, <App />); callunmount()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.