From f8e6fa4bf37657d2cdf763afb480be67f9a31994 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 27 Jun 2022 18:09:25 +1000 Subject: [PATCH] Regenerate templates --- .../templates/preact/frontend/src/main.jsx | 17 +++++++++++++---- .../templates/react/frontend/src/main.jsx | 11 +++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) 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') + )