Skip to content

Commit

Permalink
Merge branch 'canary' into get-static-props-amp-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekkolodziej committed Oct 13, 2020
2 parents 93bc65e + 7f79821 commit e313a1f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/advanced-features/custom-app.md
Expand Up @@ -44,6 +44,7 @@ The `Component` prop is the active `page`, so whenever you navigate between rout

- If your app is running and you just added a custom `App`, you'll need to restart the development server. Only required if `pages/_app.js` didn't exist before.
- Adding a custom `getInitialProps` in your `App` will disable [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) in pages without [Static Generation](/docs/basic-features/data-fetching.md#getstaticprops-static-generation).
- `App` currently does not support Next.js [Data Fetching methods](/docs/basic-features/data-fetching.md) like [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) or [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering).

### TypeScript

Expand Down
7 changes: 4 additions & 3 deletions docs/advanced-features/custom-document.md
Expand Up @@ -51,9 +51,10 @@ The `ctx` object is equivalent to the one received in [`getInitialProps`](/docs/

## Caveats

- `Document` is only rendered in the server, event handlers like `onClick` won't work
- React components outside of `<Main />` will not be initialized by the browser. Do _not_ add application logic here or custom CSS (like `styled-jsx`). If you need shared components in all your pages (like a menu or a toolbar), take a look at the [`App`](/docs/advanced-features/custom-app.md) component instead
- `Document`'s `getInitialProps` function is not called during client-side transitions, nor when a page is [statically optimized](/docs/advanced-features/automatic-static-optimization.md)
- `Document` is only rendered in the server, event handlers like `onClick` won't work.
- React components outside of `<Main />` will not be initialized by the browser. Do _not_ add application logic here or custom CSS (like `styled-jsx`). If you need shared components in all your pages (like a menu or a toolbar), take a look at the [`App`](/docs/advanced-features/custom-app.md) component instead.
- `Document`'s `getInitialProps` function is not called during client-side transitions, nor when a page is [statically optimized](/docs/advanced-features/automatic-static-optimization.md).
- `Document` currently does not support Next.js [Data Fetching methods](/docs/basic-features/data-fetching.md) like [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) or [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering).

## Customizing `renderPage`

Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/create-next-app.md
Expand Up @@ -18,6 +18,7 @@ yarn create next-app

- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory.
- **--example-path [path-to-example]** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar`
- **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. Yarn will be used by default if it's installed

### Why use Create Next App?

Expand Down
2 changes: 1 addition & 1 deletion docs/basic-features/fast-refresh.md
Expand Up @@ -75,7 +75,7 @@ local state being reset on every edit to a file:
- The file you're editing might have _other_ exports in addition to a React
component.
- Sometimes, a file would export the result of calling higher-order component
like `higherOrderComponent(WrappedComponent)`. If the returned component is a
like `HOC(WrappedComponent)`. If the returned component is a
class, state will be reset.

As more of your codebase moves to function components and Hooks, you can expect
Expand Down

0 comments on commit e313a1f

Please sign in to comment.