-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to retrieve cookie on server side? #5
Comments
Unfortunately not. I could maybe add a utility function to do so, but I don't think that makes much sense. Let me explain why: I do want to take another route though: Once vercel/next.js#9133 comes out, I would like to implement a universal plugin that fully manages Redux state throughout all pages, supporting config = {
"my.state.auth": "sync-persist" // synchronizes a state subtree between client and server (like next-redux-cookie-wrapper currently does)
"another.state.subtree": "server" // client overrides its local state with fresh server state on page loads
...
} There are plenty of ways to handle Redux state in a client-server scenario, and I would like to provide a set of reasonable default patterns, which can easily be applied to specific parts of the Redux state. This would insanely reduce the amount of manual boilerplate code... |
So as an answer to your question: Considering the current implementation, you're best off using |
Thank you for the nice explanation, I'm new to next.js and this helps me a lot that I should use |
First of all, this is a great wrapper. Many thanks for putting effort.
Any way to retrieve cookie on server side except req.headers.cookie ?
I'm using nextJS's new getServerSideProps function.
The text was updated successfully, but these errors were encountered: