tifye
tifye2w ago

VSCode JSX prop suggestions

I'm trying out Deno for the first time and can't seem to get proper intellisense for JSX. The IDE does recognize the imported types but I don't get any suggestios on props. See the attached image. Not too sure if this even is a Deno issue but I though I'd ask. I've looked through a few existing posts but nothing helped. I'm using VSCode and have initialized a Deno worksapce. This is the entire deno.json
{
"imports": {
"@react-pdf/renderer": "npm:@react-pdf/renderer@^4.3.0"
}
}
{
"imports": {
"@react-pdf/renderer": "npm:@react-pdf/renderer@^4.3.0"
}
}
No description
2 Replies
marvinh.
marvinh.2w ago
React famously doesn't ship with types out of the box. Those are in a separate package. 1. Run deno install npm:react npm:@types/react 2. Add the necessary jsx compiler options to deno.json to tell TypeScript about how JSX should be typed:
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
}
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
}
tifye
tifyeOP2w ago
This helped, thanks a ton

Did you find this page helpful?