<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb" -->

---
title: TanStack Router: Nesting & 404 pages | daily.dev
description: This article explores tips and tricks for nesting and managing routes in TanStack Router, including how to nest routes, create common layouts that are visible...
canonical: https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: TanStack Router: Nesting & 404 pages | daily.dev
og:description: This article explores tips and tricks for nesting and managing routes in TanStack Router, including how to nest routes, create common layouts that are visible...
og:url: https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb
og:image: https://api.daily.dev/og/posts/EXMH80TXB.png
og:image:alt: TanStack Router: Nesting & 404 pages
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TanStack Router: Nesting & 404 pages

**[This is Learning](https://daily.dev/sources/til)** · [@balastrong](https://daily.dev/balastrong) · 4 min read · 20 upvotes · 4 comments

## Summary

This article explores tips and tricks for nesting and managing routes in TanStack Router, including how to nest routes, create common layouts that are visible or hidden in the URL, and customize the 404 page.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/this-is-learning/tanstack-router-nesting-404-pages-36f9>

## Community discussion

Top comments from developers on daily.dev.

**@rumncode** · 1 upvotes

> I like the ability to do different layouts, but really not a fan of the (folders) being needed to accomplish it. NextJS does essentially the same thing. QwikCity just let's you declare to use a different layout. No need to duplicate the route tree. Much easier. Check out Qwik and see how easy it makes things

---

Tags: [#react](https://daily.dev/tags/react), [#react-router](https://daily.dev/tags/react-router)

[View this post on daily.dev](https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"TanStack Router: Nesting & 404 pages","url":"https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb"},"datePublished":"2024-04-09T18:57:35.665Z","dateModified":"2024-05-09T08:43:33.910Z","description":"This article explores tips and tricks for nesting and managing routes in TanStack Router, including how to nest routes, create common layouts that are visible...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/14652ad65fcb1a6753cda7c7116cf2e7?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/14652ad65fcb1a6753cda7c7116cf2e7?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"This is Learning","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Leonardo Montini 😼","url":"https://daily.dev/balastrong","image":"https://media.daily.dev/image/upload/f_auto/v1659345447/avatars/FAnk7hhtb8rFbcLZpLpo5","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":3200}},"commentCount":4,"discussionUrl":"https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":20},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"react,react-router","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"This is Learning","item":"https://daily.dev/sources/til"},{"@type":"ListItem","position":3,"name":"TanStack Router: Nesting & 404 pages"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/tanstack-router-nesting-404-pages-exmh80txb","comment":[{"@type":"Comment","text":"I like the ability to do different layouts, but really not a fan of the (folders) being needed to accomplish it. NextJS does essentially the same thing. QwikCity just let’s you declare to use a different layout. No need to duplicate the route tree. Much easier. Check out Qwik and see how easy it makes things","datePublished":"2024-04-13T20:39:44.705Z","url":"https://daily.dev/posts/EXMH80TXB#c-tADoZTfXI","author":{"@type":"Person","name":"RumNCode","url":"https://daily.dev/rumncode","image":"https://media.daily.dev/image/upload/s--T5FgpR7y--/f_auto/v1726149309/avatars/avatar_dBdziRtHMZjGKaY66rZ7b"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

