D
Deno

help

jsx in deno

Ttaiwannumberone5/16/2023
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>
IioB5/16/2023
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.
Ttaiwannumberone5/16/2023
ah, got it, thanks

Looking for more? Join the community!