title: Saving data to store VUEX
body: <p>Morning all, </p>
  
  <p>I am new to Vuex and am trying to start with the basics. 
  I have followed the tutorials for setting up a "todo list" and got all that working. But I also want more of a generic store for authentication.</p>
  
  <p>Essentially, I want the current logged in users information to be stored within the Vuex store.
  I currently have this code below withing app.vue</p>
  
  <pre class="lang-js prettyprint-override"><code>created () {
    this.fetchProjects()
    console.log('console-test ' + this.$store.getters.allProjects[0])
  
    // Firebase Auth
    firebase.auth().onAuthStateChanged((user) =&gt; {
      if (user) {
        this.user = user
  
        const ref = db.collection('Users')
          .where('user_id', '==', this.user.uid)
        ref.get().then(snapshot =&gt; {
          snapshot.forEach(doc =&gt; {
            this.userInfo = doc.data()
          })
        })
        .then(() =&gt; {
          console.log('user auth = ' + this.user.uid)
          console.log('user auth = ' + this.user.email)
          console.log('user info = ' + this.userInfo.username)
        })
      } else {
        this.user = null
      }
    })
  }
  </code></pre>
  
  <p>The area where I am console logging, I am thinking it would be a good idea to push the information currently stored in data via "this.user" to vuex store, to easily use throughout the app. What is the best way to do this?</p>