shuffle (state still broken)
This commit is contained in:
parent
c265f85bc1
commit
2b0ba8c9fe
19
app.tsx
19
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 <>
|
||||
<div>lol hey 3</div>
|
||||
<div>lol hey 12121</div>
|
||||
<p>more</p>
|
||||
</>
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.body).render(<App/>);
|
||||
export const Other =()=>{
|
||||
return <p>other app component</p>
|
||||
}
|
||||
|
||||
export function Root()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.body).render(<div><App/><Other/></div>);
|
@ -1,5 +0,0 @@
|
||||
const resp = await Deno.bundle({
|
||||
entrypoints:["file:///C:/Local%20Web%20Projects/gale/hmr/hmr-react.tsx"]
|
||||
});
|
||||
|
||||
console.log(resp);
|
@ -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 };
|
||||
console.log("run is", Default);
|
||||
export { jsx, jsxs, Fragment };
|
@ -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.
|
||||
|
@ -6,11 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<script type="module">
|
||||
import React from "/>/npm:react";
|
||||
console.log(React);
|
||||
|
||||
import "/app.tsx";
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user