Currently, I am having 3 layouts:
- has header and sidebar
- has header no sidebar
- has no header nor sidebar
What is the way to extend the layout with options whether to turn on or off the sidebar and header? These are 3 possibilities but I'm sure there should be better way
- Use 1 layout with vuex state. Set the showHeader and showSidebar beforeMount
- Use 1 layout with $route condition to show header and sidebar
- Use 3 layouts
Does anyone know any better way?
question from:https://stackoverflow.com/questions/65882458/how-to-better-extend-layout-with-conditional-component-in-nuxt