From the course: Learning Nuxt.js

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

The concept of layout and pages

The concept of layout and pages

From the course: Learning Nuxt.js

The concept of layout and pages

- [Instructor] Nuxt uses a concept called layout and pages. It's easy to think that it means same thing or that they are interchangeable, but they are not. Let's see where they are and how to use them. First, we have the layouts. Layouts in Nuxt are the building blocks of your application. They help you change to look and feel of your app, whether you want to include a navigation menu, a sidebar or even have distinct layout for mobile and desktop, while pages are the application views and routes that you create and can view directly on the browser. Let's see how to create a layout and a page in our Nuxt application. First thing we need to do is create a new folder called layout and to do that, I'll click this new folder icon and call that layouts. Inside the layouts folder, I would right-click, click New File and call our new file default.vue. Now, the default.vue file will serve as the default layout for all the pages we…

Contents