Skip to content

Commit 880b39f

Browse files
committed
docs(readme): add non-cli sdk quick start
1 parent 266e68d commit 880b39f

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,33 @@ flowchart TD
148148
- PR changeset enforcement for release-relevant package changes
149149
- Benchmark workflow with JSON artifacts uploaded per CI run
150150

151+
## SDK Quick Start (Non-CLI)
152+
153+
Use Renderify directly in your app code (no `pnpm cli`).
154+
155+
```bash
156+
pnpm add renderify
157+
```
158+
159+
```ts
160+
import { renderPlanInBrowser } from "renderify";
161+
162+
await renderPlanInBrowser(
163+
{
164+
id: "quickstart_non_cli",
165+
version: 1,
166+
root: { type: "text", value: "Loading..." },
167+
source: {
168+
language: "tsx",
169+
code: `export default () => <section>Hello from Renderify SDK</section>;`,
170+
},
171+
},
172+
{ target: "#mount" },
173+
);
174+
```
175+
176+
For pure browser pages without a build tool, load `@babel/standalone` before running TSX/JSX source.
177+
151178
## CLI Quick Start
152179

153180
```bash

0 commit comments

Comments
 (0)