Skip to content

Commit

Permalink
Update server-render.md
Browse files Browse the repository at this point in the history
  • Loading branch information
filipenevola authored Feb 10, 2022
1 parent 710f42d commit bcef031
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/source/packages/server-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ architecture of the pending HTTP response (e.g. "web.browser").
Here is a basic example of `onPageLoad` usage on the server:

```js
import React from "react";
import
from "react";
import { renderToString } from "react-dom/server";
import { onPageLoad } from "meteor/server-render";

Expand Down Expand Up @@ -160,11 +161,7 @@ In some cases you want to customize meta tags or something else in your response
You can extract information from the request using the `sink` object.

```js
import React from "react";
import { onPageLoad } from "meteor/server-render";
import { renderToNodeStream } from "react-dom/server";
import { ServerStyleSheet } from "styled-components"
import App from "/imports/Server";

const getBaseUrlFromHeaders = headers => {
const protocol = headers['x-forwarded-proto'];
Expand Down

0 comments on commit bcef031

Please sign in to comment.