Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/react/basic/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,6 @@ function App() {
)
}

const rootElement = document.getElementById('root') as HTMLElement
const rootElement = document.getElementById('root')
if (!rootElement) throw new Error('Missing #root element')
ReactDOM.createRoot(rootElement).render(<App />)
3 changes: 2 additions & 1 deletion examples/react/rick-morty/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ReactDOM from 'react-dom/client'
import App from './App'

const rootElement = document.getElementById('root') as HTMLElement
const rootElement = document.getElementById('root')
if (!rootElement) throw new Error('Missing #root element')
ReactDOM.createRoot(rootElement).render(<App />)
3 changes: 2 additions & 1 deletion examples/react/simple/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ function Example() {
)
}

const rootElement = document.getElementById('root') as HTMLElement
const rootElement = document.getElementById('root')
if (!rootElement) throw new Error('Missing #root element')
ReactDOM.createRoot(rootElement).render(<App />)
3 changes: 2 additions & 1 deletion examples/react/star-wars/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ReactDOM from 'react-dom/client'
import App from './App'

const rootElement = document.getElementById('root') as HTMLElement
const rootElement = document.getElementById('root')
if (!rootElement) throw new Error('Missing #root element')
ReactDOM.createRoot(rootElement).render(<App />)
Loading