Static GitHub Issues

[2056] Update View after API call in created method

prev: views ssr and chrome network
next: vuex modules error unknown action type
<template>
{{ x }}
</template>

<script>
...
...
created () {
  axios.get('www.url.com').then(result => {
    this.x = result
  }
}

I've tried searching through the issues thread, but found nothing about this.

In the above code, i want to update the view after an API call. Am i implementing this wrongly? Or should i be using another way to do this?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1824">#c1824</a>)</em></sub></div>