pre-defining data in SSR?
Curious — can you use NextJS middleware to push data into getServerSideProps? Let’s say you have some global variable that gets reset every page refresh — but you need to populate through some API or pass it from the client. What’s a good way to populate the server with that global variable before it reaches a pages SSR
3 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I don’t want to set it as a header or a cookie. I guess I have to see how next auth does it in regards to getting sessions within SSR that’s synced with the sessions on the client
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View