About reatom-jsx
A reference skill for implementing and explaining `@reatom/jsx`, aimed at developers working with Reatom JSX. It emphasizes its non-React rendering model and directs related core, review, and reference topics to their respective sources.
Key features
- 01Reference section map
- 02Mount-time component evaluation
- 03Reactive atom and prop patterns
- 04JSX error isolation guidance
Use cases
- 01Implementing `@reatom/jsx` components
- 02Binding writable atoms to UI
- 03Handling styles and dynamic lists
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ reatom/ reatom --skill reatom-jsxAfter installing, type/reatom-jsxin Claude Code to confirm it loaded.
Bundled filesREFERENCE.md
Details
From the project READMEReatom 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 |
| Conditional / theme styles | Reference → Conditional Styles with Attributes, cssVar |
| Components and lists | Reference → Components |
| Bulk prop binding | Reference → $spread |
| SVG and raw markup | Reference → SVG |
| Mount side effects | Reference → ref props |
| Errors, boundaries, jsxError | Error handling |
| Utilities | Utilities → reatomClassName, css, cssVar, <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). Prefer@reatom/vite(reatom()plugin) so mount/route HMR dispose is automatic. - For dynamic lists, store elements in atoms or map inside reactive children — no keyed reconciliation.
- Isolate UI failures with
<ErrorBoundary fallback={...}>and lazy children{() => <Child />}; track globally viajsxError/addCallHook(jsxError, ...). - Never write
[data-x] &(or:where(...) &) in acssprop. State on the same element: binddata-x={state}and select&[data-x='v']. State from an ancestor: provide it withcssVar(...).provide(state)and query${token.container('v')} { … }. Prefer custom properties for value differences and reactive children for content differences; reserve selectors and style queries for structural differences.
When REFERENCE.md and local examples disagree, prefer the reference and fix the example if it is wrong.
Comments
Markdown supported