Frontend CLI + Templates

This commit is contained in:
2024-03-25 17:03:46 +01:00
parent a54ab8620e
commit 716d623db4
10 changed files with 339 additions and 126 deletions

9
react/_tmpl/src/App.jsx Normal file
View File

@@ -0,0 +1,9 @@
import {useMemo} from "react";
import API from "shared/api";
export default function App() {
const api = useMemo(() => new API(), []);
return <></>
}

9
react/_tmpl/src/index.js Normal file
View File

@@ -0,0 +1,9 @@
import React from "react";
import {createRoot} from "react-dom/client";
import App from "./App";
import {LocaleProvider} from "shared/locale";
const root = createRoot(document.getElementById('{{MODULE_NAME}}'));
root.render(<LocaleProvider>
<App />
</LocaleProvider>);