diff --git a/app.tsx b/app.tsx index f07aec1..f70f32a 100644 --- a/app.tsx +++ b/app.tsx @@ -1,10 +1,25 @@ import ReactDOM from "react-dom/client"; +import React from "react"; +console.log(React.useId) export function App(){ + + //const [countGet, countSet] = React.useState(0); + return <> -
lol hey 3
+
lol hey 12121
+

more

} -ReactDOM.createRoot(document.body).render(); \ No newline at end of file +export const Other =()=>{ + return

other app component

+} + +export function Root() +{ + +} + +ReactDOM.createRoot(document.body).render(
); \ No newline at end of file diff --git a/bundle-file.ts b/bundle-file.ts deleted file mode 100644 index 9dd66c3..0000000 --- a/bundle-file.ts +++ /dev/null @@ -1,5 +0,0 @@ -const resp = await Deno.bundle({ - entrypoints:["file:///C:/Local%20Web%20Projects/gale/hmr/hmr-react.tsx"] -}); - -console.log(resp); \ No newline at end of file diff --git a/jsx-runtime.tsx b/hmr/hmr-jsx-runtime.tsx similarity index 55% rename from jsx-runtime.tsx rename to hmr/hmr-jsx-runtime.tsx index d93021c..f995ec6 100644 --- a/jsx-runtime.tsx +++ b/hmr/hmr-jsx-runtime.tsx @@ -1,4 +1,6 @@ import Default from "react-jsx-runtime-original"; const jsx = Default.jsx; +const jsxs = Default.jsxs; const Fragment = Default.Fragment; -export { jsx, Fragment }; \ No newline at end of file +console.log("run is", Default); +export { jsx, jsxs, Fragment }; \ No newline at end of file diff --git a/hmr/hmr-react.tsx b/hmr/hmr-react.tsx index ff59ef5..1a07059 100644 --- a/hmr/hmr-react.tsx +++ b/hmr/hmr-react.tsx @@ -2,8 +2,6 @@ import * as ReactOriginal from "react-original"; const ReactParts = ReactOriginal.default ? ReactOriginal.default : ReactOriginal; -console.log(ReactParts); - /* Each custom component is secretly modified to have an extra state and id. diff --git a/index.html b/index.html index 6898cc0..f105cf8 100644 --- a/index.html +++ b/index.html @@ -6,11 +6,7 @@ \ No newline at end of file diff --git a/server.ts b/server.ts index d7cb19e..35e56a5 100644 --- a/server.ts +++ b/server.ts @@ -66,7 +66,7 @@ for(const key in denoBody.imports) } denoBody.imports["react-jsx-runtime-original"] = `${denoBody.imports[denoBody.compilerOptions.jsxImportSource]}/jsx-runtime`; -denoBody.imports["react/jsx-runtime"] = "/^/jsx-runtime.tsx"; +denoBody.imports["react/jsx-runtime"] = "/^/hmr/hmr-jsx-runtime.tsx"; denoBody.imports["react-original"] = denoBody.imports[denoBody.compilerOptions.jsxImportSource]; denoBody.imports["react"] = "/^/hmr/hmr-react.tsx";