Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 12, 2024
1 parent 5698ec4 commit 880e88b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/full/.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function runTest() {
test(url + ' (HTML)', async () => {
const html = await fetchHtml(url)
// Isn't rendered to HTML
expect(html).toContain('<div id="page-view"></div>')
expect(html).toContain('<div id="react-root"></div>')
expect(html).not.toContain(text)
expect(getTitle(html)).toBe(title)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vike-react/src/renderer/onRenderClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let root: ReactDOM.Root
const onRenderClient: OnRenderClientSync = (pageContext): ReturnType<OnRenderClientSync> => {
const page = getPageElement(pageContext)

const container = document.getElementById('page-view')!
const container = document.getElementById('react-root')!
if (container.innerHTML !== '' && pageContext.isHydration) {
// First render (hydration)
root = ReactDOM.hydrateRoot(container, page)
Expand Down
2 changes: 1 addition & 1 deletion packages/vike-react/src/renderer/onRenderHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const onRenderHtml: OnRenderHtmlAsync = async (pageContext): ReturnType<OnRender
${faviconTag}
</head>
<body>
<div id="page-view">${pageView}</div>
<div id="react-root">${pageView}</div>
</body>
</html>`

Expand Down

0 comments on commit 880e88b

Please sign in to comment.