Skip to content

Commit 076f42a

Browse files
committed
fix: workaround error Cannot find namespace JSX
1 parent af04a3f commit 076f42a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/vike-react/src/integration/getPageElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React, { Suspense, useEffect } from 'react'
44
import type { PageContext } from 'vike/types'
55
import { PageContextProvider } from '../hooks/usePageContext.js'
66

7-
function getPageElement(pageContext: PageContext): { page: JSX.Element; renderPromise: Promise<void> } {
7+
function getPageElement(pageContext: PageContext): { page: React.JSX.Element; renderPromise: Promise<void> } {
88
const {
99
Page,
1010
config: { Loading },

packages/vike-react/src/types/PageContext.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type React from 'react'
2-
import type { JSX } from 'react'
32
import type ReactDOM from 'react-dom/client'
43
import type { ConfigFromHookResolved } from './Config.js'
54
import type { PageHtmlStream } from '../integration/onRenderHtml.js'
@@ -11,7 +10,7 @@ declare global {
1110
/** The root React component of the page */
1211
Page?: () => React.ReactNode
1312
/** The root React element of the page */
14-
page?: JSX.Element
13+
page?: React.JSX.Element
1514
/** The React root DOM container */
1615
root?: ReactDOM.Root
1716

0 commit comments

Comments
 (0)