Skip to content

Commit

Permalink
Split up & tweak next/client initialization (#33838)
Browse files Browse the repository at this point in the history
For streaming, we want the main bundle to be loaded with `async` rather than `defer`. As the first step to doing that, we need an explicit initialization step, rather than occurring as a side effect of being loaded.

For now, I've just split the logic into a `initialization` and `hydrate` (previously `initNext`) functions and called them as a side effect of `next/client/next` and `next/client/next-dev` as before. A follow-up PR will move that to a separate script tag [as recommended](reactwg/react-18#114).
  • Loading branch information
devknoll committed Mar 7, 2022
1 parent ff6b750 commit a666591
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 201 deletions.

0 comments on commit a666591

Please sign in to comment.