halfByteMedic
React types without @deno-types before every import?
Here's a link to the repo where it did work for me. https://github.com/Duenke/Deno-with-React-Pokedex-App/blob/main/deno.json
14 replies
React types without @deno-types before every import?
I'd be thrilled to find a better answer here as for what's going on. Seems to me like Deno LSP can't tell that
@types/react
is "for react
" if that makes sense.
I found a hack somewhere online that will at least get you going on your way. Add a file called react.d.ts
somewhere in your source and the contents will re-export react with the types on top of it.14 replies