From 2de1421d83338fef71686cf073bca599cf285b7f Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 20 Aug 2022 15:00:05 +1000 Subject: [PATCH] Update preact template --- .../templates/preact/frontend/src/app.jsx | 4 ++-- .../templates/preact/frontend/src/main.jsx | 17 ++++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/app.jsx b/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/app.jsx index 1ada97ac4..c3e68d025 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/app.jsx +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/app.jsx @@ -1,5 +1,5 @@ -import './App.css' -import logo from "./assets/images/logo-universal.png" +import './app.css'; +import logo from "./assets/images/logo-universal.png"; import {Greet} from "../wailsjs/go/main/App"; import {useState} from "preact/hooks"; 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 e50e105db..6c42a5949 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,14 +1,5 @@ -import React from 'react' -import {createRoot} from 'react-dom/client' -import './style.css' -import App from './App' +import {render} from 'preact'; +import {App} from './app'; +import './style.css'; -const container = document.getElementById('root') - -const root = createRoot(container) - -root.render( - - - -) +render(, document.getElementById('app')); \ No newline at end of file