title: Vuex how to pass state/getter in data prop
body: <p>I retrieved my data from database using axios under my vuex </p>
  
  <pre><code>const state = {
      giveaways: null
  }
  
  const actions = {
      getGiveAways : ({commit}) =&gt;{
  
          axios({
              url : '/prod/api/thresholds_settings',
              method: 'post',
              data : {
              },
              config: 'JOSN'
          })
          .then(response=&gt;{
              if(response.status == 200){
                  //console.log(response.data.total_giveaways);
                  commit('SET_GIVEAWAYS', response.data.total_giveaways)
              }
          })
          .catch(error=&gt;{
              if(error.response){
                  console.log('something happened')
              }
          });
      }
  }
  
  const mutations = {
      SET_GIVEAWAYS : (state, obj)=&gt;{
          state.giveaways = obj
      }
  
  }
  
  const getters = {
      doneGiveAways(state){
          return state.giveaways
      }
  }
  </code></pre>
  
  <p>In my Dashboard.vue I have</p>
  
  <pre><code>import {mapState,mapGetters} from 'vuex'
  export default{
      data: () =&gt; ({
          cards: [],
          giveaways: ''
      }),
      computed:{
          ...mapState({
              Giveaway: state =&gt; state.Threshold.giveaways
          }),
          doneGiveAways(){
              return this.$store.getters.doneGiveAways
          }
      },
      ready(){
          //giveaways: this.Giveaways
          //console.log(this.Giveaways);          
      },
      created(){
          const self = this
          this.cards[0].result_val = 2
          this.cards[2].result_val = 2;
  
      },
      mounted(){
          this.$store.dispatch('getGiveAways');
          console.log(this.giveaways);
  
      }
  }
  </code></pre>
  
  <p>My problem is I need to pass the value from the mapState <code>Giveaway</code> to my returning data <code>giveaways: ''</code> so when page fires I can get the response value using <code>this.giveaways</code>. If I just call {{ Giveaway }} in my html it shows the value. But I need to make something like <code>this.giveaways = this.$store.state.Thresholds.giveaways</code></p>