Skip to content

Commit 89a180a

Browse files
committed
feat: react v19 create root options
1 parent 4d1d205 commit 89a180a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/index.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ import ThemeIndex from './theme'
66
import { ProThemeProvider } from './theme/hooks'
77
import i18n from './i18n/i18n'
88

9-
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLDivElement)
9+
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLDivElement, {
10+
onCaughtError: (error) => {
11+
console.log('caught error', error)
12+
},
13+
onUncaughtError: (error) => {
14+
console.log('uncaught error', error)
15+
},
16+
onRecoverableError: (error) => {
17+
console.log('recoverable error', error)
18+
},
19+
identifierPrefix: 'wui',
20+
})
1021

1122
root.render(
1223
<I18nextProvider i18n={i18n}>

0 commit comments

Comments
 (0)