diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/main.jsx b/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/main.jsx index 41787dabc..e50e105db 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/main.jsx +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/main.jsx @@ -1,5 +1,14 @@ -import {render} from 'preact'; -import {App} from './app'; -import './style.css'; +import React from 'react' +import {createRoot} from 'react-dom/client' +import './style.css' +import App from './App' -render(, document.getElementById('app')); +const container = document.getElementById('root') + +const root = createRoot(container) + +root.render( + + + +) diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/react/frontend/src/main.jsx b/v2/cmd/wails/internal/commands/initialise/templates/templates/react/frontend/src/main.jsx index a6c27f6a8..e50e105db 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/react/frontend/src/main.jsx +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/react/frontend/src/main.jsx @@ -1,11 +1,14 @@ import React from 'react' -import ReactDOM from 'react-dom' +import {createRoot} from 'react-dom/client' import './style.css' import App from './App' -ReactDOM.render( +const container = document.getElementById('root') + +const root = createRoot(container) + +root.render( - , - document.getElementById('root') + )