'PersistGate' cannot be used as a JSX component. Its instance returned by 'render()' are incompatible between these types. Type 'React.ReactNode' is not assignable to type 'import("C:/OurAppFolder/node_modules/@types/react-redux/@types/react/index").ReactNode'.
We are getting TypeScript error TS2786:
'PersistGate' cannot be used as a JSX component. Its instance returned by 'render()' are incompatible between these types. Type 'React.ReactNode' is not assignable to type 'import("C:/OurAppFolder/node_modules/@types/react-redux/@types/react/index").ReactNode'.
The relevant pieces in our package.json are:
When we add a resolutions entry (as seen below) to our package.json file, this error goes away:
However, this is a bandaid that causes us some problems with other packages that expect newer versions of the React Types.
This problem has previously been mentioned on StackOverflow but I couldn't find anything when I searched through past issues: https://stackoverflow.com/questions/71826046/react-native-persistgate-cannot-be-used-as-a-jsx-component-its-instance-type