dayhaysoos / use-shopping-cart

Shopping cart state and logic for Stripe
MIT License
907 stars 118 forks source link

Get rid of redux persist issue with NextJS #308

Closed dayhaysoos closed 1 year ago

dayhaysoos commented 1 year ago

Just putting this here to document my finding and keep y'all updated.

Technically, we shouldn't be dealing with this issue due to this:

https://redux-toolkit.js.org/usage/usage-guide#use-with-redux-persist

However, I think I finally found the issue.

The problem is coming from the value for "stripe" in the redux store coming through as 'undefined'. I think the solution would be as simple as making it an empty string or trying to get it to ignore this error in particular, but I'm not sure how that might affect the rest of the lib so I have to experiment.

dayhaysoos commented 1 year ago

This will be fixed by #310 methinks

alec-bfa commented 1 year ago

Sadly this is still an issue as of 3.1.5

dayhaysoos commented 1 year ago

@alec-bfa I'm gonna take a look soon, thanks for letting me know

dayhaysoos commented 1 year ago

@alec-bfa you have a repo I can look at? I can't seem to reproduce the error now

dayhaysoos commented 1 year ago

Hey @alec-bfa, I just released 3.1.6... This might be the actual fix lol...can you double check

dayhaysoos commented 1 year ago

Pretty sure I fixed it here tbh e25423c52198a8c18abfb51190eaae7e8c8f8664

alec-bfa commented 1 year ago

@dayhaysoos Yep I can confirm that has fixed the problem. At least a clutter free development terminal - Thanks!