diff options
author | 2021-08-19 00:45:29 -0700 | |
---|---|---|
committer | 2021-08-19 00:45:29 -0700 | |
commit | 0826f7710186d7ec26d8d2b284ef8f89186d9350 (patch) | |
tree | da4ead7ff1e0b7cb5b321703acebdf33ad9d5f8f /demos/hello-next/bun-framework-next/client.development.tsx | |
parent | c92c7beececaabbfd449af62511857c694ec8f87 (diff) | |
download | bun-0826f7710186d7ec26d8d2b284ef8f89186d9350.tar.gz bun-0826f7710186d7ec26d8d2b284ef8f89186d9350.tar.zst bun-0826f7710186d7ec26d8d2b284ef8f89186d9350.zip |
Fix loading client-side CSS during page transitions
Former-commit-id: f2b6acad6a2e77d3982dd684f88edca222edab06
Diffstat (limited to 'demos/hello-next/bun-framework-next/client.development.tsx')
-rw-r--r-- | demos/hello-next/bun-framework-next/client.development.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/demos/hello-next/bun-framework-next/client.development.tsx b/demos/hello-next/bun-framework-next/client.development.tsx index 824171086..24c737b55 100644 --- a/demos/hello-next/bun-framework-next/client.development.tsx +++ b/demos/hello-next/bun-framework-next/client.development.tsx @@ -251,6 +251,8 @@ async function _boot(EntryPointNamespace) { ); CachedApp = AppModule.default; + } else { + CachedApp = App; } } @@ -281,6 +283,8 @@ async function _boot(EntryPointNamespace) { isPreview, }); + globalThis.next.router = router; + ReactDOM.hydrate( <TopLevelRender App={CachedApp} @@ -300,6 +304,7 @@ function TopLevelRender({ App, Component, props, scroll }) { } export function render(props) { + ReactDOM.render( <TopLevelRender {...props} />, document.querySelector("#__next") |