Next.js Folder Conventions: Understanding Parentheses in Route Names

This confused me the first time I saw it in a Next.js project. A folder with brackets around the name => (auth). (dashboard). (marketing). Looks wrong. Feels wrong. But it's one of the most useful patterns in the framework. 🤔 Parentheses in Next.js folder names are invisible to the URL. 👻 "/app/(auth)/login" → renders at "/login" "/app/(dashboard)/jobs" → renders at "/jobs" The parentheses never show up in the browser. They exist purely for the developer. 🧑💻 What you get is the ability to group routes that share the same layout without polluting the URL. Your auth pages get one layout. Your dashboard gets another. Zero overlap. Zero hacks. ✅ One punctuation character. Completely changes how you organise your app. 🔥 Small thing. But once you know it, you can't unsee it. 👀 What other Next.js conventions tripped you up the first time? #nextjs #webdevelopment #javascript #typescript #fullstackdeveloper

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories