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

 

message profile
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-16
loading..

DEVMAESTERS

Newsletter

Services

Frontend Development |Backend Development |Full Website Development |Bootstrap Website upgrades | Website Debbugging | Website Hosting & deployment

Contact

Interested in hiring me or collaborating with me on a project, click on any of the links below to get my social media handle

Or contact me via Tel: (+234)-806-225-7480 | Email: abubakarzakari1703@gmail.com

Copywright@devmaesters.com
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.