bjoluc / next-redux-cookie-wrapper

Sync a subset of your Redux state with cookies in Next.js :cookie: :sparkles:
MIT License
114 stars 4 forks source link

CookieConfig not being used on client #7

Closed Pikachews closed 4 years ago

Pikachews commented 4 years ago

I noticed that my cookieConfig settings weren't taking effect on the client, whether it was changing the persist key or the cookie expiration.

The root cause seems to be that the cookieConfigs are only being used on the server. https://github.com/bjoluc/next-redux-cookie-wrapper/blob/e2616e3d4ebdd472bd04799a01926c915b5e7e19/src/index.tsx#L126-L132

Whereas on the client, no cookieConfig is being used: https://github.com/bjoluc/next-redux-cookie-wrapper/blob/e2616e3d4ebdd472bd04799a01926c915b5e7e19/src/index.tsx#L164 https://github.com/bjoluc/next-redux-cookie-wrapper/blob/e2616e3d4ebdd472bd04799a01926c915b5e7e19/src/index.tsx#L71

bjoluc commented 4 years ago

:tada: This issue has been resolved in version 1.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

bjoluc commented 4 years ago

Wow, the bot was faster than me :smile: Anyway, thanks for pointing this out!

Pikachews commented 4 years ago

Thanks for the quick fix!