Logo
Explore Help
Sign In
kennethnym/jrx
1
0
Fork 0
You've already forked jrx
mirror of https://github.com/kennethnym/jrx.git synced 2026-03-20 11:51:17 +00:00
Code Issues Packages Projects Releases Wiki Activity
Files
b8d1d2de80227dc1f123a23ba453686acde4d06e
jrx/example/specs/simple.tsx

11 lines
241 B
TypeScript
Raw Normal View History

Add example: Bun HTTP server showcasing jrx JSX-to-JSON rendering Bun React app with HMR that demonstrates jrx's render() pipeline. Shows JSX source, live UI via @json-render/react, and JSON output side by side. - example/specs/simple.tsx: flat Stack > Text + Button - example/specs/full.tsx: nested layout with state, events, visibility conditions, and watchers - Uses defineCatalog + defineRegistry from @json-render/react - Fix package.json exports to match actual tsup output (.js/.cjs instead of .mjs/.js) Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 00:48:37 +00:00
/** @jsxImportSource jrx */
import { render } from "jrx";
import { Stack, Text, Button } from "../components";
export const simpleSpec = render(
<Stack>
<Text content="Hello from jrx!" />
<Button label="Click me" />
</Stack>
);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.3 Page: 146ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API