title: Computed property on Nuxtjs and Axios?
body: <p>I want to return an array of unique cards by name. I was able to do this in Vuejs using the following code.</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id='Home'&gt;
  
      &lt;div class="columns is-multiline"&gt;
          &lt;card v-for="card in uniqueCards" :card="card" :key="card.id"/&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import uniqBy from 'lodash/uniqBy'
  import Card from '@/components/Site/Card'
  
  export default {
    name: 'Home',
    components: { Card },
    computed: {
      cards () {
        return this.$store.state.cards
      },
      uniqueCards () {
        return uniqBy(this.$store.state.cards, function (r) {
          return r.project
        })
      }
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I am converting my project to Nuxtjs and using an api to get appCards. How do I achieve the same functionality as above using axios? Below piece works, but I want to use the uniqueCards() function. What am I doing wrong here?</p>
  
  <pre><code>&lt;template&gt;    
      &lt;div id="Home"&gt;
  
          &lt;div class="columns is-multiline"&gt;
          &lt;card v-for="card in appCards" :card="card" :key="card.id"/&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import uniqBy from 'lodash/uniqBy'
  import Card from "~/components/Card.vue";
  
  export default {
      components: {
          Card
      },
      data() {
          return {
              appCards: []
          };
      },
      async asyncData({ $axios, params }) {
          try {
              let appCards = await $axios.$get(`/appcards/`);
              return { appCards };
          } catch (e) {
              return { appCards: [] };
          }
      },
      mounted: {
          uniqueCards () {
              uniqBy(this.appCards, function (r) {
                  return r.project;
          })
          }
      },
  };
  &lt;/script&gt;
  </code></pre>