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.
Similar Content
- Next js unhandled runtime error Invalid src prop
- How to clean text editor data on next.js
- How to setup a copy to clipboard functionality in either react.js or next.js site
- DeprecationWarning: Using 'compiler' as the first argument is deprecated. Please use 'options' as the first argument and 'compiler' as the second argument error on React Native.
- error: API resolved without sending a response for /XXXX/XXXX, this may result in stalled requests.
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-16Categories
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.