I’m working on a single-page app in Vuejs and I’m wondering how I create a navbar that shows/hides different sections of the app based on what I click. I have the navbar laid out, I just need to figure out how to make it show/hide components. I tried to make the navbar component modify an array that tells my app which components to display, but it can’t access the array. What should I do instead?
If you’re not using Vue-Router, this may be what you’re looking for.
Vue-Router would be preferable in most Vue SPAs though.