Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs related to React 18 #35952

Merged
merged 5 commits into from Apr 8, 2022
Merged

Update docs related to React 18 #35952

merged 5 commits into from Apr 8, 2022

Conversation

shuding
Copy link
Member

@shuding shuding commented Apr 6, 2022

  • Streaming (concurrent features or the Fizz architecture) is no longer opt-in or alpha, when you have React 18 installed. It's always enabled.
  • Switchable Runtime is a new alpha feature (which requires React 18 too, hence it's added under that list).

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running yarn lint

@shuding shuding requested review from huozhi and leerob April 6, 2022 21:14
@shuding shuding marked this pull request as ready for review April 7, 2022 12:52
docs/advanced-features/react-18/overview.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/overview.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/streaming.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/streaming.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/streaming.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/switchable-runtime.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/switchable-runtime.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/switchable-runtime.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/streaming.md Outdated Show resolved Hide resolved
docs/advanced-features/react-18/streaming.md Outdated Show resolved Hide resolved
Co-authored-by: Steven <steven@ceriously.com>
@shuding shuding merged commit 1c92591 into vercel:canary Apr 8, 2022
@shuding shuding deleted the shu/9dcf branch April 8, 2022 15:09
@@ -0,0 +1,34 @@
# Switchable Runtime (Alpha)

By default, Next.js uses Node.js as the runtime for page rendering, including pre-rendering, server-side rendering.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
By default, Next.js uses Node.js as the runtime for page rendering, including pre-rendering, server-side rendering.
By default, Next.js uses Node.js as the runtime for page rendering, including pre-rendering and server-side rendering.


This option determines which runtime should be used as the default rendering runtime for all pages.

## Per-page Runtime Option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Per-page Runtime Option
## Page Runtime Option

export const config = {
runtime: 'nodejs',
}
```
Copy link
Member

@styfle styfle Apr 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this config also work for /pages/api/**?

kodiakhq bot pushed a commit that referenced this pull request Apr 8, 2022
As per the feedback in #35952.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
colinhacks pushed a commit to colinhacks/next.js that referenced this pull request Apr 14, 2022
* update docs of streaming

* add switchable runtime docs

* add page to manifest

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* Update docs/advanced-features/react-18/streaming.md

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Steven <steven@ceriously.com>
colinhacks pushed a commit to colinhacks/next.js that referenced this pull request Apr 14, 2022
As per the feedback in vercel#35952.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants