Question about using SWR/ISR with user auth
Hello
I'm thinking about enabling swr for some pages to avoid waiting for rendering everytime and enhance the response time. But I'm worried it would cause conflicts with user state.
An example is I have a Login button in the header which shows a user dropdown if logged in and a Logout button. Are these would be handled properly if using swr or do I have to make certain adjustments?
2 Replies
if you handle auth on the server-side at the moment, then it'd be tricky with caching, yes
Hmm I think I'll have to try out and see how it goes. Thanks