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 03:41:18 +00:00
Code Issues Packages Projects Releases Wiki Activity
Files
af85ad3b0798812fdcf31a4930dd7766a2bc9bb3
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: 151ms Template: 6ms
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