https://codesandbox.io/s/9z8p69427r
Keep alive the current tab data, so it won't make another API call.
The data is reset when user change the tab and enter again.
https://codesandbox.io/s/73lqxj6436
posts.vue

when using keep-alive, data() will be called repeatedly when the component is activated.
I don't know if this is a bug.
Thank you, that works but I feel it is a little bit hacky.
In Vue.js, I could set the same behaviour without the if condition, weird.
Thanks!
I don't think this issue should be closed. We don't know the root cause of this problem.
I am more inclined to think that this is a bug.
Sorry, I closed since no one else commented, but you're right. Maybe someone of the core team could decide if it is a bug or not.
I'll have a look.
Most helpful comment
I don't think this issue should be closed. We don't know the root cause of this problem.
I am more inclined to think that this is a bug.