Menu

1 / 6

Next.js Layouts RFC in 5 minutes

Vercel News·Lee Robinson·6 months ago
#Z94TKfWZ
#vercel#layout#next#layouts#article
Reading 0:00
15s threshold

The Next.js team at Vercel released the Layouts RFC a few months ago outlining the vision for the future of routing, layouts, and data fetching in the framework. The RFC is detailed and covers both basic and advanced features.

This post will cover the most important features of the upcoming Next.js changes landing in the next major version that you should be aware of.

Link to heading Creating Routes

In the new app directory, folders are used to define routes. To create a route, add a page.js file inside a folder. For example, app/page.js :

export default function Page ( ) {

return < h1 > Hello, Next.js! </ h1 >

}

A new Page inside the app directory.

A page (with the page.js naming convention) is UI that is unique to a specific route segment.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.