Reader small image

You're reading from  Full Stack Web Development with Remix

Product typeBook
Published inNov 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781801075299
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Andre Landgraf
Andre Landgraf
author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf

Right arrow

Sharing layouts

Nested routing enables us to compose a page from a nested route hierarchy. In this section, we will utilize parent routes to reuse layouts between nested child routes. We will also learn how to share code between routes without creating new segments in the URL, with pathless layout routes.

Using parent layout routes

Let’s improve the look and feel of the BeeRich dashboard. Ideally, a user should be able to quickly switch between the income and expenses overview pages. It’s time to add a navigation bar.

We already utilized parent layout routes for the dashboard/expenses and dashboard/income pages. By rendering the list of expenses and income in a parent route (dashboard.expenses.tsx and dashboard.income.tsx, respectively), we nested the content of the child routes on the same page.

Now, we will take advantage of nested routing again to add a shared navigation bar to all dashboard pages. Follow these steps:

  1. Create a dashboard.tsx file...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Full Stack Web Development with Remix
Published in: Nov 2023Publisher: PacktISBN-13: 9781801075299

Author (1)

author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf