diff --git a/README.md b/README.md
index 22f9c6a7..3f407cd2 100644
--- a/README.md
+++ b/README.md
@@ -134,7 +134,9 @@ try {
}
...
```
+
Don't forget to pass your custom params to `` in `client.js`:
+
```js
// ./src/client.js
...
@@ -403,16 +405,21 @@ After.js works similarly to Next.js with respect to overriding HTML document str
```js
// ./src/Document.js
import React from 'react';
-import { AfterRoot, AfterData } from '@jaredpalmer/after';
+import {
+ AfterRoot,
+ AfterData,
+ AfterScripts,
+ AfterStyles,
+} from '@jaredpalmer/after';
class Document extends React.Component {
- static async getInitialProps({ assets, data, renderPage }) {
+ static async getInitialProps({ renderPage }) {
const page = await renderPage();
- return { assets, data, ...page };
+ return { ...page };
}
render() {
- const { helmet, assets, data } = this.props;
+ const { helmet } = this.props;
// get attributes from React Helmet
const htmlAttrs = helmet.htmlAttributes.toComponent();
const bodyAttrs = helmet.bodyAttributes.toComponent();
@@ -427,19 +434,12 @@ class Document extends React.Component {
{helmet.title.toComponent()}
{helmet.meta.toComponent()}
{helmet.link.toComponent()}
- {assets.client.css && (
-
- )}
+
-
-
+
+