score:373

Accepted answer

Your file extension is most likely .ts instead of .tsx.

Therefore TypeScript is interpreting <ctx.Provider as cast and tries to find a type Provider in the namespace ctx.

score:13

Please use tsx instead of ts it has some minute differences. tsx obviously allows the usage of jsx tags inside typescript.


Related Query

More Query from same tag