Skip to content

Commit 112b11a

Browse files
committed
docs(readme): add concise top-level JSX quickstart example
1 parent cabdd97 commit 112b11a

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@
77
> LLM generates JSX/TSX → browser renders it directly at runtime — no backend build server, no deploy step, JSPM package support with an explicit compatibility contract.
88
> Renderify is a runtime-first dynamic renderer that lets LLMs produce real, interactive UI on the fly. It bridges the gap between "LLM can generate code" and "users can see and interact with that UI instantly" — with inline transpilation via `@babel/standalone`, and no backend compiler/deploy pipeline in the loop.
99
10+
## 30-Second JSX Example
11+
12+
```tsx
13+
import { renderPlanInBrowser } from "renderify";
14+
15+
await renderPlanInBrowser(
16+
{
17+
id: "hello_jsx_runtime",
18+
version: 1,
19+
root: { type: "text", value: "Loading..." },
20+
source: {
21+
language: "tsx",
22+
code: `import { format } from "date-fns/format"; export default () => <section>Today: {format(new Date(), "yyyy-MM-dd")}</section>;`,
23+
},
24+
},
25+
{ target: "#mount" },
26+
);
27+
```
28+
29+
Defaults (no extra config):
30+
31+
1. Execute JSX/TSX directly at browser runtime.
32+
2. Resolve bare imports through JSPM (`auto-pin-latest`).
33+
3. Pin resolved URLs into `moduleManifest` before execution.
34+
1035
## The Problem
1136

1237
LLMs are increasingly capable of generating UI code, but **there is no good way to render that output directly in the browser**:

0 commit comments

Comments
 (0)