Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Why is Redux causing all of my React Native tags to have a ts(2786) error?

$
0
0

In my App.tsx file, as soon as I enter this line of code:

import { Provider } from "react-redux";

all of my React Native tags throughout my entire project get a red line under them with an error message that reads:

(alias) class Viewimport View'View' cannot be used as a JSX component.  Its instance type 'View' is not a valid JSX element.    The types returned by 'render()' are incompatible between these types.      Type 'React.ReactNode' is not assignable to type 'import("C:/<app-path>/node_modules/@types/hoist-non-react-statics/node_modules/@types/react/index").ReactNode'.        Type '{}' is not assignable to type 'ReactNode'.ts(2786)

Does anyone know why this might be happening? If not is there a way to disable this error?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>