redux-persist
redux-persist copied to clipboard
Is it good practice to use PersistGate in a child component?
Hello
I'm using NextJS for SEO purposes and using redux-persist PersistGate makes my app render the loading prop instead of the application content when crawlers scan the app or if you check the source code of the app.
I have fixed this by only using PersistGate in a child component that will have the persisted data.
Would this cause any issues or is it bad practice? If so, how do I fix the server render content that PersistGate overwrites?
I'm also getting this error each time the child component that has the PersistGate opens, not sure if it's related:
Cannot read property '_fromJEN' of null

Any progress on this, facing a similar issue.
Presist gate is rendering the loader prop instead of the children and thus affecting SEO.
I can't even move the Persist gate to a child.
Is there some way to avoid this?
Yes, I can across the same issue after hours of debugging. SEO metadata that is set on page components does not work because the loading component is rendering (even when it is null) instead of the children. All statically generated pages therefore do not have any page-specific SEO tags.