“Svg refers to a value but is being used here as a type”
I ran into this issue recently using Typescript and React Native in VS Code.
Svg refers to this Svg component I was importing.
I was importing the component correctly, and my react component looked right, but every line of JSX in the render function was underlined red. It was frankly doing my head in that I couldn’t figure out what was wrong. About 30 minutes later I realised what the problem was:
The file extension was “.ts” when it should have been “.tsx” 🙈
Renaming the file immediately fixed the issue.