Use react18 in playground
This commit is contained in:
parent
f562d225c6
commit
5387fda517
22 changed files with 47 additions and 46 deletions
|
@ -146,11 +146,11 @@ const r3fExtension: IExtension = {
|
|||
{
|
||||
class: 'snapshot',
|
||||
mount: ({paneId, node}) => {
|
||||
ReactDOM.createRoot(node).render(
|
||||
React.createElement(SnapshotEditor, {paneId}),
|
||||
)
|
||||
const root = ReactDOM.createRoot(node)
|
||||
|
||||
root.render(React.createElement(SnapshotEditor, {paneId}))
|
||||
function unmount() {
|
||||
ReactDOM.unmountComponentAtNode(node)
|
||||
root.unmount()
|
||||
}
|
||||
return unmount
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue