It's always been a hassle to manage authentication especially when it comes to setting up a new project. I'll be honest, despite having more than a year or two's experience in web development, it's still difficult to implement a client-side authentic...

Markdown supported Β· ββ΅ to post
Jason Chen
Nothing is true, everything is permitted.
Hi, I enjoy your posts, always clear and insightful!π
In the code snippet with
useEffect, I wondered if missing dependencies could cause unexpected behavior?useEffect(() => { if (!isAuthenticated && !currentUser.isLoading) { router.push("/"); // or login page } }, // missing isAuthenticated and // currentUser.isLoading [Component, isAuthenticated, currentUser.isLoading]);Great job, and eager for your future posts!