0
Already tried https://github.com/necolas/react-native-web/issues/832

Got:

error message

for:

code

I thought the issue might be the linter error I was getting b/c of the react-native aliasing of react-native-web (which for some reason, TypeScript can't figure out...). Was able to resolve that via npm i -D react-native @types/react-native.

However, still got the same error.

Next, I tried converting my SFC (stateless functional component) to a class component. Still got:

similar error message

So I'm wondering why I'm getting this error message even though I've configured TypeScript.

1 Answers1

0

This was my issue: In my tsconfig.json, I had "jsx": "preserve". Switching to "jsx": "react" fixed it!