migrate to React 18 API

This commit is contained in:
Dany Castillo
2022-04-04 09:46:23 +02:00
committed by bdbch
parent 2f3a0312a8
commit 1e0ca1483b

View File

@@ -13,7 +13,8 @@ export default function init(name: string, source: any) {
import(`../src/${demoCategory}/${demoName}/React/index.jsx`) import(`../src/${demoCategory}/${demoName}/React/index.jsx`)
.then(module => { .then(module => {
ReactDOM.render(React.createElement(module.default), document.getElementById('app')) // @ts-ignore waiting for https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210
ReactDOM.createRoot(document.getElementById('app')).render(React.createElement(module.default))
debug() debug()
}) })
} }