you can access other component data and methods from another component

Solved this with Vuex:


    import Vue from 'vue';
    import Vuex from 'vuex';
    const store = new Vuex.Store({
      state: {
        profile_page: 'profile',
      mutations: {
        changePage(state, page) {
          state.profile_page = page;
    export default store

And then commit the state on both parent and child component, i made a method with the commit statement inside the method:

    changePage(page) {
       this.$store.commit('changePage', page);

and add a click event afterwards inside the html tag like this:


Problem solved.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top