I am working on a web application and I used this starter kit as the basis of my project. The problem is that the cookie is not available on the server side, so I can not use it to render the component on the server.
I use react-cookie to save account data after login
cookie.save('account', accountData)
and get
var account = cookie.load('account')
when i need it. I see that the cookie is saved in the browser and I can use it on the client side after downloading the component, but I need it on the server side for preliminary rendering operations.
So the question is how to achieve this? Or if the cookie does not work, what is the best way to do this?
source
share