Skip to content

Commit 7fc4fc3

Browse files
committed
chore: update readme
1 parent 80ac9ff commit 7fc4fc3

2 files changed

Lines changed: 35 additions & 8 deletions

File tree

packages/sdk/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,18 @@ unsubscribeMaxUsers();
482482
replane.close();
483483
```
484484

485+
## Framework SDKs
486+
487+
For React, Next.js, and Svelte applications, use the dedicated framework SDKs which provide hooks, context providers, and SSR support:
488+
489+
| Framework | Package | Description |
490+
| ----------- | ------------------- | ---------------------------------------- |
491+
| **React** | `@replanejs/react` | Hooks and context for React apps |
492+
| **Next.js** | `@replanejs/next` | SSR/SSG support for Next.js |
493+
| **Svelte** | `@replanejs/svelte` | Reactive stores for Svelte and SvelteKit |
494+
495+
See the [examples directory](./examples/) for runtime-specific examples (Node.js, Bun, Deno, Browser).
496+
485497
## Community
486498

487499
Have questions or want to discuss Replane? Join the conversation in [GitHub Discussions](https://github.com/orgs/replane-dev/discussions).

packages/sdk/examples/README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,54 @@
22

33
Examples demonstrating how to use `@replanejs/sdk` across different JavaScript runtimes.
44

5-
## Examples
5+
## Runtime Examples
66

7-
| Runtime | Directory | Description |
8-
|---------|-----------|-------------|
9-
| **Node.js** | [`node/`](./node/) | Server-side Node.js with TypeScript |
10-
| **Bun** | [`bun/`](./bun/) | Native TypeScript execution with Bun |
11-
| **Deno** | [`deno/`](./deno/) | Secure runtime with Deno |
12-
| **Browser** | [`browser/`](./browser/) | Client-side browser app with Vite |
7+
| Runtime | Directory | Description |
8+
| ----------- | ------------------------ | ------------------------------------ |
9+
| **Node.js** | [`node/`](./node/) | Server-side Node.js with TypeScript |
10+
| **Bun** | [`bun/`](./bun/) | Native TypeScript execution with Bun |
11+
| **Deno** | [`deno/`](./deno/) | Secure runtime with Deno |
12+
| **Browser** | [`browser/`](./browser/) | Client-side browser app with Vite |
13+
14+
## Framework SDKs
15+
16+
For React, Next.js, and Svelte applications, use the dedicated framework SDKs which provide hooks, context providers, and SSR support:
17+
18+
| Framework | Package | Examples |
19+
| ----------- | ------------------- | ----------------------------------------------------- |
20+
| **React** | `@replanejs/react` | [`packages/react/examples/`](../../react/examples/) |
21+
| **Next.js** | `@replanejs/next` | [`packages/next/examples/`](../../next/examples/) |
22+
| **Svelte** | `@replanejs/svelte` | [`packages/svelte/examples/`](../../svelte/examples/) |
1323

1424
## Quick Start
1525

1626
Each example includes its own README with specific instructions. Generally:
1727

1828
### Node.js
29+
1930
```bash
2031
cd node
2132
npm install
2233
REPLANE_SDK_KEY=your-key REPLANE_BASE_URL=https://replane.example.com npm start
2334
```
2435

2536
### Bun
37+
2638
```bash
2739
cd bun
2840
bun install
2941
REPLANE_SDK_KEY=your-key REPLANE_BASE_URL=https://replane.example.com bun start
3042
```
3143

3244
### Deno
45+
3346
```bash
3447
cd deno
3548
REPLANE_SDK_KEY=your-key REPLANE_BASE_URL=https://replane.example.com deno task start
3649
```
3750

3851
### Browser
52+
3953
```bash
4054
cd browser
4155
npm install
@@ -46,9 +60,10 @@ npm run dev
4660
## Features Demonstrated
4761

4862
All examples show:
63+
4964
- Creating a type-safe Replane client
5065
- Getting config values with TypeScript inference
5166
- Using context for user-specific config evaluation
5267
- Subscribing to real-time config updates via SSE
5368
- Graceful shutdown/cleanup handling
54-
- Fallback values for offline/error scenarios
69+
- Default values for offline/error scenarios

0 commit comments

Comments
 (0)