DEV Community

Discussion on: Those silly mistakes we all make

Collapse
 
totally_waqas profile image
Waqas • Edited

I made a new react component but kept getting type errors (was using typescript) in VS Code. I removed everything one by one until I was left with just a ‘< div />’ and still there were squiggly lines all over. I looked everywhere but couldn’t figure out why (even copied the entirety of a component that was working). Ultimately, I realised my file was a ‘.ts’ instead of ‘.tsx’.

Collapse
 
philnash profile image
Phil Nash

One "x" out of place and not even in the contents of the file. Ouch!