Open warcayac opened 1 week ago
These compiler options worked for me.
...
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "npm:react@^18.3",
"jsxImportSourceTypes": "npm:@types/react@^18.3"
},
...
See https://docs.deno.com/runtime/reference/jsx/#jsx-automatic-runtime-(recommended)
I just went with:
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "React.createElement",
"jsxFragmentFactory": "React.Fragment"
},
"imports": {
"react": "https://esm.sh/react@18.3.1"
}
}
I have a Deno 2 project with these files:
deno.json
App.tsx
this project is running as expected with no errors, But if I use this line:
I get the following error on H1 tags:
I tried adding @types/react package, then no error was showed however when running the program I get this error:
I don't know what's happening. Any ideas?