title: How can I access data in asyncData with Nuxt
body: <p>I'm attempting to build a server-side sortable table with Nuxt, and I'd like to be able to specify the default sort column and direction in my Vue <code>data</code>, and access that in my <code>asyncData</code> function. Something like this:</p>
  
  <pre><code>&lt;script&gt;
  export default {
    async asyncData ({ $axios, params }) {
      const things = await $axios.$get(`/api/things`, {
        params: {
          sort_column: this.sortColumn,
          sort_ascending: this.sortAscending,
        }
      });
      return { things };
    },
    data () {
      return {
        sortColumn: 'created_at',
        sortAscending: true
      }
    },
    // ...
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>But it appears that <code>data</code> is not yet available, as <code>this.sortColumn</code> and  <code>this.sortAscending</code> are not defined. How can I access these defaults when <code>asyncData</code> runs while also allowing them to be changed when the user interacts with the page. (Alternatively, what's a better way to structure this?)</p>
  
  <p>Note: This question was asked <a href="https://stackoverflow.com/questions/51224224/passing-data-in-asyncdata-nuxt-js">here</a>, but the accepted answer is not relevant to this situation.</p>