rsnext/packages/next
Shu Ding 438ee9618f
Inline server data response with partial hydration (#32330)
This PR implements the basic inline embedded server response data (#30994) for RSC, as well as partial hydration (#31338) for RSC and React 18 SSR streaming.

For #30994, `renderTargetSuffix` is passed to the `bodyResult` resolver so the stream can inject corresponding hydration scripts and the closing body tag at the correct time. The expected behavior should be _prefix_, _body shell_, _suffix scripts_, _stream and inlined data_, _close body_.

For #31338, we have to force turn on `disableOptimizedLoading` when `concurrentFeatures` is enabled to opt-out of deferred script tags.

## Bug

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

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] 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`
2021-12-13 10:48:18 +00:00
..
bin fix(NODE_ENV): Warn when launching start or build on development (#14033) 2021-12-07 14:25:39 +00:00
build Inline server data response with partial hydration (#32330) 2021-12-13 10:48:18 +00:00
bundles Add webpack5 types to right files 2021-11-09 15:40:13 +01:00
cli Add port and hostname options to Next Server (#31858) 2021-11-28 16:48:43 +00:00
client Inline server data response with partial hydration (#32330) 2021-12-13 10:48:18 +00:00
compiled Compile escape-string-regexp (#32310) 2021-12-09 13:31:53 -06:00
export Include page for export errors for easier debugging (#32013) 2021-12-02 19:31:36 +00:00
image-types Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
lib Include submodules in exported type definition (#28316) 2021-11-26 14:46:56 +01:00
pages Revert support for render prop in <Main /> (#32184) 2021-12-06 21:22:05 +00:00
server Inline server data response with partial hydration (#32330) 2021-12-13 10:48:18 +00:00
shared/lib Revert support for render prop in <Main /> (#32184) 2021-12-06 21:22:05 +00:00
telemetry telemetry: collect feature usage for linting during build (#32022) 2021-12-07 02:41:31 +00:00
trace Remove trace_target env var in favor of .next/trace (#31697) 2021-11-22 20:58:49 +01:00
types Refactor server/render for SSR streaming (#31231) 2021-11-15 15:29:34 +00:00
amp.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
app.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
app.js
babel.d.ts
babel.js
client.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
client.js
config.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
config.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
data.d.ts
data.js
data.sqlite Fix export worker threads options (#25063) 2021-05-14 12:50:29 +02:00
document.d.ts Fix document type import path (#32117) 2021-12-04 10:23:15 +00:00
document.js
dynamic.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
dynamic.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
error.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
error.js
head.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
head.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
image.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
image.js Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
index.d.ts Include submodules in exported type definition (#28316) 2021-11-26 14:46:56 +01:00
jest.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
jest.js Ensure next/jest is published (#31296) 2021-11-11 11:48:12 +01:00
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
link.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
link.js
package.json v12.0.8-canary.4 2021-12-10 10:08:40 -06:00
README.md docs(readme.md): add good first issue section to readme (#25085) 2021-05-18 16:10:01 -05:00
router.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
router.js
rsc.d.ts fix unstable_useRefreshRoot typing (#32364) 2021-12-10 12:45:55 +00:00
rsc.js Add unstable_useRefreshRoot (#32342) 2021-12-10 10:22:31 +00:00
script.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
script.js Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
server.d.ts Add TS types for NextMiddleware (#30578) 2021-11-30 20:43:40 +00:00
server.js Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
taskfile-ncc.js Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
taskfile-swc.js Remove noop import (#31722) 2021-11-24 15:40:58 +01:00
taskfile.js Rename experimental vital hook (#32343) 2021-12-12 21:14:12 +01:00
tsconfig.json Revert incremental config to fix missing types (#30644) 2021-10-29 23:16:11 -05:00
vitals.d.ts Rename experimental vital hook (#32343) 2021-12-12 21:14:12 +01:00
vitals.js Rename experimental vital hook (#32343) 2021-12-12 21:14:12 +01:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Authors