0

'TouchableOpacity' cannot be used as a JSX component. Its instance type 'TouchableOpacity' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'import("/Users/sanjeevkumar/React/help_idea_update/mypatapp-v2-update/node_modules/@types/react-native/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.

enter image description here

why this is giving error message i already do this

"resolutions": {
    "@types/react": "17.0.2",
    "@types/react-dom": "17.0.2",
    "graphql": "^16.5.0"
  },

and run yarn install

Sanjeev Kumar
  • 71
  • 1
  • 2

2 Answers2

1

The warning is coming from typescript.

Update the following

"@types/react": "17.0.14",

For "@types/react-native", update to same version as the react-native and install again.

Joseph Ajibodu
  • 1,093
  • 10
  • 14
0

The warning is coming from typescript.

Update the "@types/react" to save version as the react version.

Same for @types/react-dom in your de dependencies

Joseph Ajibodu
  • 1,093
  • 10
  • 14