Async / await stopped working after upgrade #965
Unanswered
robsontenorio
asked this question in
Help
Replies: 2 comments 1 reply
-
mounted() {
this.tab = this.$page.props.query?.tab || "first";
},
data(){
return {
loading: false,
tab: ""
}
},
watch: {
tabs(value) {
this.loadTab(value)
}
},
methods: {
loadTab(tab) {
this.$inertia.reload({
only: [tab],
onStart: () => (this.loading = true),
onFinish: () => (this.loading = false),
});
},
}, Just noticed From any orgin page: It works with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My previous versions:
Upgraded to latest version:
This code used to work on PREVIOUS VERSION
After upgrading to latest versions I have noticed from VueDevTools that
this.loading
does not change its value when doing a visit. If I switch fromthis.$inertia.visit(...)
toaxios.get(...)
the variables works as expected.Am I missing something?
Note: yes, I could do it with promises, but in this case I would prefer async/await.
Beta Was this translation helpful? Give feedback.
All reactions