mirror of
https://github.com/kennethnym/jrx.git
synced 2026-03-20 11:51:17 +00:00
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>
This commit is contained in:
10
example/specs/simple.tsx
Normal file
10
example/specs/simple.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
/** @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
Block a user