Closed makapaka23 closed 6 years ago
It should work without async await.
Can you try this -
return new Promise(function(resolve, reject) {
axios.get('url/to/api').then(response=>{
resolve(response.data);
}).catch (error=>{
reject(error);
});
});
FYI: If you use babel, it will also convert it to promise.
Seems like this issue is not related to this package.
I cannot seem to get this to work with normal promises instead of async await (for now trying not to use babel etc).
I'm getting the error
Uncaught (in promise) TypeError: Cannot read property 'pagination' of undefined
Standard way I've been doing things in the method using
<table-component :data="fetchSessions">
fetchSessions() { axios.get(this.endpoint) .then(({data}) => { this.dataSession = data; }); },
Anything you can suggest to get it working with promises or must it use async await?