Next.js routing system is robust but incomplete

Next.js routing system is robust but incomplete

The React Framework for the Web isn't quite complete yet. The routing system still has somethings it could do better.

Introduction

The new next.js app directory has provided a robust feature set for rendering our pages. From basic pages to layouts, route groups, dynamic routes, Loading UI and streaming, Parallel Routes and Intercepting Routes, it's more likely than not that you'd find what you are looking for when it comes to rendering. But unfortunately, that isn't the case.

Problem

While building one of my projects, I came across a rather popular rendering pattern on some web apps. When a user isn't logged into a website, they show the product page; if you look at the URL, it only shows the base URL. But when the user is logged in they are shown the dashboard page but the URL remains the base URL

I have scraped through the documentation, tried hacky methods to get it to work and even asked on the discord, but I haven't been able to find a way to get this to work. Granted I might not be the best programmer and there might be a way that I'm just not seeing. But as far as I know, this can't be achieved with Next.js.

Conclusion

So that's it. Next.js is an amazing framework and has significantly improved my experience as a web developer. But this only shows that there is more to be worked on and the job is never finished.