PersistGate' cannot be used as a JSX component. Its instance type 'PersistGate' is not a valid JSX element.
I get the error below in my App.tsx file after I have implemented data persistance with redux
'PersistGate' cannot be used as a JSX component.
Its instance type 'PersistGate' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types
Admin
2023-04-16
Quick fix for this is to add the following to your package.json file
If you're using Yarn
..............
"resolutions": {
"@types/react": "^17.0.39"
}
................
If you're using NPM
"overrides": {
"@types/react": "17.0.39"
}
Ensure that the version is the same in your dependecies and dev dependencies list.
Finally execute yarn or npm install again so it will download the package.
And that's all, hope this helps in fixing your error.
Add Message
Click on the button below to add a new message to this thread
Tags
#Javascript
Thread detail
Satus: Open
Messages: 1Started: 2023-04-16loading..
Privacy Policy
By using our website,
you agree that devmaesters can store cookies on your device and disclose information in accordance with our privacy policy.