abersager / redux-persist-cookie-storage

Redux Persist storage adapter for cookies
MIT License
92 stars 10 forks source link

Its not working with SSR nextjs. #17

Open andrew-oko-odion opened 5 years ago

andrew-oko-odion commented 5 years ago

I have tried following the examples in the readme. its not working for nextjs.

bjoluc commented 4 years ago

@andrew-oko-odion It works for me with Next.js. Of course this highly depends on where you put the code. If you are still interested, just let me know and I'm glad to help you!

andrew-oko-odion commented 4 years ago

I am interested, can you show a working code in nextjs?

bjoluc commented 4 years ago

Sure! Currently, I am doing it like this (using next-redux-wrapper):

I am currently looking into this and will consider creating a little package to make this hassle-free within the next weeks if I find a nice all-in-one solution...

andrew-oko-odion commented 4 years ago

I will be look out for that package, please keep me posted thanks!!!

bjoluc commented 4 years ago

@andrew-oko-odion I had a little hackathon and finished the package :smile: Will release it on Tuesday (some TypeScript issues have to be solved yet) :+1:

bjoluc commented 4 years ago

@andrew-oko-odion Here it is! https://github.com/bjoluc/next-redux-cookie-wrapper Unfortunately, I can only publish it to npm tomorrow because I used npm unpublish on a test release. So if you want to use it before then, clone it and run npm install, npm build, and npm link. Then in your project, run npm link next-redux-cookie-wrapper and you should be ready to go. Cheers!

andrew-oko-odion commented 4 years ago

Thanks!

On Nov 26, 2019 10:38 PM, "bjoluc" notifications@github.com wrote:

@andrew-oko-odion https://github.com/andrew-oko-odion Here it is! https://github.com/bjoluc/next-redux-cookie-wrapper Unfortunately, I can only publish it to npm tomorrow because I used npm unpublish on a test release. So if you want to use it before then, clone it and run npm install, npm build, and npm link. Then in your project, run npm link next-redux-cookie-wrapper and you should be ready to go. Cheers!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/abersager/redux-persist-cookie-storage/issues/17?email_source=notifications&email_token=ABACDMEL44V5HGALXNQGKKDQVWJOXA5CNFSM4GHPO7FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFHQVYA#issuecomment-558828256, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABACDMFNPD33L2QSYUZDH5LQVWJOXANCNFSM4GHPO7FA .

bjoluc commented 4 years ago

It's on npm now :tada: https://www.npmjs.com/package/next-redux-cookie-wrapper Let the advertising begin :grinning: You're welcome!

andrew-oko-odion commented 4 years ago

Fantastic, would check it out and let you know how it goes... Good work

andrew-oko-odion commented 4 years ago

Fantastic, would check it out and let you know how it goes... Good work

andrew-oko-odion commented 4 years ago

can you include an example project, most people have a slightly different configuration of their nextjs projects, so that one can make comparison and adapt legacy project accordingly

bjoluc commented 4 years ago

Let's discuss this in the next-redux-cookie-wrapper issues :+1:

bjoluc commented 4 years ago

@andrew-oko-odion How is it going? Do you have any specific questions?

andrew-oko-odion commented 4 years ago

I am fine now, I got it to work fine

On Sat, Jan 25, 2020 at 3:38 PM bjoluc notifications@github.com wrote:

@andrew-oko-odion https://github.com/andrew-oko-odion How is it going? Do you have any specific questions?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/abersager/redux-persist-cookie-storage/issues/17?email_source=notifications&email_token=ABACDMEZUFQPVN5C6A3PP53Q7RFHBA5CNFSM4GHPO7FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ45XAY#issuecomment-578411395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABACDMEW4KSCLM6UISI46SDQ7RFHBANCNFSM4GHPO7FA .