matthewmueller / next-cookies

Tiny little function for getting cookies on both client & server with next.js.
368 stars 17 forks source link

Adding high level function / HOC cookies provider #9

Open dbrrt opened 5 years ago

dbrrt commented 5 years ago

I'm finding very useful having an high level functions like in this project. Is that something someone else could be interested to have?

nfriedly commented 5 years ago

I'm not sure I understand what you're saying here. Are you requesting additional features? Offering to add additional features?

dbrrt commented 5 years ago

For now, I'm using this library (https://github.com/reactivestack/cookies/tree/master/packages/react-cookie/) which's offering high level function to access cookies, and I was wondering if it could be interesting to add these functionalities to next-cookies. I can work on that if needed to anyone else, otherwise, I realized (later) that react-cookie works just fine with nextjs

nfriedly commented 5 years ago

Okay, I see. That's interesting. However, if react-cookie works with next.js, then I don't see any value in duplicating that functionality. Maybe we should add a note to the readme to check out react-cookie?

nfriedly commented 5 years ago

Sorry I didn't mean to close this

dbrrt commented 5 years ago

Sounds good, I personally prefer using react-cookie for now, as it works with all my projects involving authentication. Maybe we should add a documentation note in react-cookie on the integration within nextjs.

Also, I'm currently using for some project next-cookies to parse cookies available in headers to inject them in the CookieProvider (react-cookie) and so having my cookies available to the client and server during component rendering.