DEV Community

Discussion on: 😲VueJS pages with Dynamic layouts! Problems and a solution!

Collapse
 
savkataras profile image
Taras Savka • Edited

You should simply create a reusable component with slot. Import it globally and just use it that way. You won't need to link specific layout on each view.

Something like this, depending on your design complexity.

Export default {
name: 'layoyt',
}

Collapse
 
lampewebdev profile image
Michael "lampe" Lazarski

🤔🤔 and how does this support multiple different layouts?

Collapse
 
savkataras profile image
Taras Savka

Create few global components, apply different scss and you can have multiple layouts

Thread Thread
 
lampewebdev profile image
Michael "lampe" Lazarski

I'm not sure if you have read the article.

It is about how to load that layouts not how you implement a single layout 🤔🤔🤔🤔