next.js
b146da60 - Refactor renderers and RenderResult (#46955)

Commit
3 years ago
Refactor renderers and RenderResult (#46955) This PR does two major changes: 1. Make sure both pages renderer and app renderer return `RenderResult`, no more `null`. This was achieved with a new `null` type in the constructor `new RenderResult(null)`, and a `.isNull()` method. 2. Remove all mutations of the `renderOpts` object inside renderers. To pass extra information out, they need to be attached to the `RenderResult` now. This also requires 1) to be done. These changes are the initial steps to the isolated rendering worker architecture. Besides those there're also some type improvements. Fixes NEXT-807. ---------
Author
Parents
Loading