2024-02-19
3430
#nextjs
Ibadehin Mojeed
172517
109
Feb 19, 2024 â‹… 12 min read

A guide to Next.js layouts and nested layouts

Ibadehin Mojeed I'm an advocate of project-based learning. I also write technical content around web development.

Recent posts:

Exploring Hurl An Alternative To Postman

Exploring Hurl, a command line alternative to Postman

Hurl is an excellent Postman alternative that improves the DX of working with APIs through the command line.

Nwani Victory
May 20, 2024 â‹… 8 min read
How To Integrate WunderGraph With Your Frontend Application

How to integrate WunderGraph with your frontend application

Unify and simplify APIs using WunderGraph to integrate REST, GraphQL, and databases in a single endpoint.

Boemo Mmopelwa
May 17, 2024 â‹… 5 min read
Understanding The Latest Webkit Features In Safari 17.4

Understanding the latest Webkit features in Safari 17.4

The Safari 17.4 update brought in many modern features and bug fixes. Explore the major development-specific updates you should be aware of.

Rahul Chhodde
May 16, 2024 â‹… 10 min read
Using Webrtc To Implement Peer To Peer Video Streaming In A Node Js Project

Using WebRTC to implement P2P video streaming

Explore one of WebRTC’s major use cases in this step-by-step tutorial: live peer-to-peer audio and video streaming between systems.

Oduah Chigozie
May 16, 2024 â‹… 18 min read
View all posts

2 Replies to "A guide to Next.js layouts and nested layouts"

  1. Thank you!
    Very helpful, I like both approaches though I prefer the App Router approach. I am testing this in Typescript since it is my language of choice. I just saw a new update 6hrs ago. Once again thank you and also for keeping it up to date.

    Greets from Sweden

  2. Hi, please help, I am working on nextjs V14.1.4.

    This is my folder structure->
    (authorized)
    ->learner-materials
    ->feedback
    page.tsx
    ->report
    page.tsx
    ->session
    page.tsx
    ->layout.tsx

    I have a folder (authorized) inside this (authorized) folder I have all authorized routes.

    and I have one RootLayout inside the authorized folder.

    and I have a learner-material route inside learner material I have 3 subroutes

    like this
    /learner-materials/feedback
    /learner-materials/report
    /learner-materials/session

    whenever the user navigates between learner material routes like feedback to report or session, the whole of root layout loads again which causes an unnecessary API call.
    how can I solve this problem please help.

Leave a Reply