migrate to React 18 API
This commit is contained in:
@@ -13,7 +13,8 @@ export default function init(name: string, source: any) {
|
||||
|
||||
import(`../src/${demoCategory}/${demoName}/React/index.jsx`)
|
||||
.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()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user