-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[19] Add docs for prerender APIs (#7320)
* Add prerender APIs * fix code blocks
- Loading branch information
1 parent
3c6c1fd
commit b1eb4a3
Showing
7 changed files
with
677 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Static React DOM APIs | ||
--- | ||
|
||
<Intro> | ||
|
||
The `react-dom/static` APIs let you generate static HTML for React components. They have limited functionality compared to the streaming APIs. A [framework](/learn/start-a-new-react-project#production-grade-react-frameworks) may call them for you. Most of your components don't need to import or use them. | ||
|
||
</Intro> | ||
|
||
--- | ||
|
||
## Static APIs for Web Streams {/*static-apis-for-web-streams*/} | ||
|
||
These methods are only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API), which includes browsers, Deno, and some modern edge runtimes: | ||
|
||
* [`prerender`](/reference/react-dom/server/renderToReadableStream) renders a React tree to static HTML with a [Readable Web Stream.](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) | ||
|
||
|
||
--- | ||
|
||
## Static APIs for Node.js Streams {/*static-apis-for-nodejs-streams*/} | ||
|
||
These methods are only available in the environments with [Node.js Streams:](https://nodejs.org/api/stream.html) | ||
|
||
* [`prerenderToNodeStream`](/reference/react-dom/server/renderToPipeableStream) renders a React tree to static HTML with a [Node.js Stream.](https://nodejs.org/api/stream.html) | ||
|
||
|
Oops, something went wrong.