Update React render

pull/2413/head
Jérémy Rialland 2022-11-23 18:07:01 +01:00 committed by Jérémy Rialland
parent 017949bf4a
commit 72b02990e6
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { I18nProvider } from '@react-aria/i18n'
import { withProfiler } from '@sentry/react'
import { render } from 'react-dom'
import { createRoot } from 'react-dom/client'
import App from './App'
import i18next from './locales/i18n'
@ -30,5 +30,8 @@ if (!import.meta.env.SSR) {
// eslint-disable-next-line no-console
console.error(err)
)
render(<AppEnWithProfiler />, document.querySelector('#js'))
const container = document.querySelector('#js') as Element
const root = createRoot(container)
root.render(<AppEnWithProfiler />)
}

View File

@ -1,6 +1,6 @@
import { I18nProvider } from '@react-aria/i18n'
import { withProfiler } from '@sentry/react'
import { render } from 'react-dom'
import { createRoot } from 'react-dom/client'
import App from './App'
import i18next from './locales/i18n'
@ -20,5 +20,7 @@ if (!import.meta.env.SSR) {
// eslint-disable-next-line no-console
console.error(err)
)
render(<AppFrWithProfiler />, document.querySelector('#js'))
const container = document.querySelector('#js') as Element
const root = createRoot(container)
root.render(<AppFrWithProfiler />)
}