Why useSession() Is undefined on First Load in Next.js When Deployed to Production (and how i fixed it)
Jan 14 · 2 min read · When i Deployed my Saas (next.js app) in production i noticed something strange. On the first load my console showed session undefined but when i refreshed the page ie /dashboard everything worked perfectly. Even More Confusing that this never happen...
Join discussion