{"action":"opened","issue":{"url":"https://api.github.com/repos/posva/vuexfire/issues/43","repository_url":"https://api.github.com/repos/posva/vuexfire","labels_url":"https://api.github.com/repos/posva/vuexfire/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/posva/vuexfire/issues/43/comments","events_url":"https://api.github.com/repos/posva/vuexfire/issues/43/events","html_url":"https://github.com/posva/vuexfire/issues/43","id":214191237,"number":43,"title":"[vuex] unknown mutation type: users/VUEXFIRE/objectValue","user":{"login":"19r3ka","id":8618002,"avatar_url":"https://avatars0.githubusercontent.com/u/8618002?v=3","gravatar_id":"","url":"https://api.github.com/users/19r3ka","html_url":"https://github.com/19r3ka","followers_url":"https://api.github.com/users/19r3ka/followers","following_url":"https://api.github.com/users/19r3ka/following{/other_user}","gists_url":"https://api.github.com/users/19r3ka/gists{/gist_id}","starred_url":"https://api.github.com/users/19r3ka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19r3ka/subscriptions","organizations_url":"https://api.github.com/users/19r3ka/orgs","repos_url":"https://api.github.com/users/19r3ka/repos","events_url":"https://api.github.com/users/19r3ka/events{/privacy}","received_events_url":"https://api.github.com/users/19r3ka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-14T20:08:00Z","updated_at":"2017-03-14T20:08:00Z","closed_at":null,"body":"I have been banging my head against the wall trying to solve this yet-another issue I have developping with VuexFire. And the lack of documentation is not helping.\r\n\r\nhere is my main.js\r\n```\r\nexport default new Vue({\r\n  el: '#app',\r\n\r\n  // As soon as possible initialize Firebase bindings with Auth and database\r\n  beforeCreate () {\r\n    auth()\r\n      .onAuthStateChanged(user => {\r\n        if (user) {\r\n          // bind the app's currentUser to the firebase user of the same uid\r\n          this.$bindAsObject('users.currentUser', database().ref(`users/${user.uid}`))\r\n\r\n          // // bind the app's claims instance to firebase's claims/${uid}\r\n          // this.$bindAsArray('claims', database().ref(`claims/${user.uid}`))\r\n        } else {\r\n          auth()\r\n            .signInAnonymously()\r\n            .catch(this.$handleError)\r\n        }\r\n      }).bind(this)\r\n  },\r\n\r\n  render: h => h(App),\r\n\r\n  store // inject vuex into all components as this.$store\r\n})\r\n```\r\n\r\nand below is the Vuex module definition for 'users'\r\n```\r\nconst state = {\r\n  currentUser: null\r\n}\r\n\r\nconst getters = {\r\n  currentUser: ({ currentUser }) => currentUser,\r\n  isLoggedIn: ({ currentUser }) => !!currentUser\r\n}\r\n\r\nconst mutations = moduleMutations('users')\r\n\r\nexport default {\r\n  getters,\r\n  namespaced: true,\r\n  mutations,\r\n  state\r\n}\r\n```\r\n\r\nWhat I get when I run this code is **[vuex] unknown mutation type: users/VUEXFIRE/objectValue** and it seems the bad code section is *this.$bindAsObject('users.currentUser', database().ref(`users/${user.uid}`))*\r\n\r\nI just want my local state 'currentUser' to be synced with the registered user of the same uid in the Firebase Realtime Database. Any help or redirection to some documentation would be welcome. Thank you."}}
{"actor":{"display_login":"19r3ka"}}