How to safely use SSR, Zustand, and Local Storage together? #2803
-
I am a rookie engineer who has only worked with CSR applications before. Now, due to certain reasons, I need to implement SSR for my application. Consider the following scenario: (This is how I used to do it in CSR)
After switching to SSR, what changes should be made to ensure the data can be used as safely as it was in CSR? For example, how can I avoid "data sharing on the server" (sorry, I don’t quite understand this) leading to user data leakage? Lastly, I have already read the SSR and Next.js documentation for Zustand, but I’m still confused. Could you provide me with a simple and secure example based on this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@nikbobo we talked about that in SSR and Hydration, and Nextjs guides. I encourage you to read those guides. BTW, ping me if you have any questions. |
Beta Was this translation helpful? Give feedback.
@nikbobo we talked about that in SSR and Hydration, and Nextjs guides. I encourage you to read those guides. BTW, ping me if you have any questions.