Skip to content

Commit 9cabda1

Browse files
authored
docs(rsc): remove unimportant APIs (#830)
1 parent 9fc18d7 commit 9cabda1

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

packages/plugin-rsc/README.md

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ npx degit vitejs/vite-plugin-react/packages/plugin-rsc/examples/starter my-app
1919

2020
## Examples
2121

22-
**Start here:** [`./examples/starter`](./examples/starter) - Recommended for understanding the plugin
22+
**Start here:** [`./examples/starter`](./examples/starter) - Recommended for understanding the package
2323

2424
- Provides an in-depth overview of API with inline comments to explain how they function within RSC-powered React application.
2525

@@ -295,35 +295,6 @@ export function UserApp() {
295295
}
296296
```
297297

298-
#### `<id>?vite-rsc-css-export=<name>`
299-
300-
This special query convention provides automatic injection of `import.meta.viteRsc.loadCss`.
301-
302-
For example,
303-
304-
```tsx
305-
// my-route.tsx
306-
export function Page(props) {
307-
return <div>...</div>
308-
}
309-
310-
// my-route.tsx?vite-rsc-css-export=Page
311-
function Page(props) {
312-
return <div>...</div>
313-
}
314-
315-
function __Page(props) {
316-
return (
317-
<>
318-
{import.meta.viteRsc.loadCss()}
319-
<Page {...props} />
320-
</>
321-
)
322-
}
323-
324-
export { __Page as Page }
325-
```
326-
327298
### Available on `ssr` environment
328299

329300
#### `import.meta.viteRsc.loadBootstrapScriptContent("index")`
@@ -434,25 +405,6 @@ This module re-exports RSC runtime API provided by `react-server-dom/client.brow
434405
- `createFromFetch`: a robust way of `createFromReadableStream((await fetch("...")).body)`
435406
- `encodeReply/setServerCallback`: server function related...
436407

437-
## High level API
438-
439-
> [!NOTE]
440-
> High level API is deprecated. Please write on your own `@vitejs/plugin-rsc/{rsc,ssr,browser}` integration.
441-
442-
This is a wrapper of `react-server-dom` API and helper API to setup a minimal RSC app without writing own framework code like [`./examples/starter/src/framework`](./examples/starter/src/framework/). See [`./examples/basic`](./examples/basic/) for how this API is used.
443-
444-
### `@vitejs/plugin-rsc/extra/rsc`
445-
446-
- `renderRequest`
447-
448-
### `@vitejs/plugin-rsc/extra/ssr`
449-
450-
- `renderHtml`
451-
452-
### `@vitejs/plugin-rsc/extra/browser`
453-
454-
- `hydrate`
455-
456408
## CSS Support
457409

458410
The plugin automatically handles CSS code-splitting and injection for server components. This eliminates the need to manually call [`import.meta.viteRsc.loadCss()`](#importmetaviterscloadcss) in most cases.

0 commit comments

Comments
 (0)