taiwannumberone
taiwannumberone15mo ago

jsx in deno

Hi, I have simple code that takes use of jsx. Based on deno docs, the jsx support should be ootb. Is there anything I need to add? The error I get:
'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.deno-ts(2686) (property) JSX.IntrinsicElements.img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>
2 Replies
ioB
ioB15mo ago
JSX is ootb, but you still need to specify the actual jsx engine. There are a lot of options, but I think Preact is the most popular one among the Deno community. There's some configuration needed to set up your jsx import source iirc.
taiwannumberone
taiwannumberone15mo ago
ah, got it, thanks