Vue tabs oniondidenter reload data

Is it possible to reload the component’s data when pressing the back button within Ionic Tabs? I can get an alert for onIonDidEnter but only from within setup() which is no good to me as I can refresh the data of the component from that function - I need access to a function within methods, or this.$store - which also doesn’t seem possible from vue setup().

Essentially I am loading data from $store in one page, navigating to another within the same tab, making an action which will add a key to storage, pressing back navigation and the first page needs to update the data (removing the item which key is in storage).

How to use the Lifecycle hooks with the Options API and Composition API can be found here.

How to use Vuex store in the setup() method can be found here.

It is basically:

import { useStore } from 'vuex'

export default {
  setup () {
    const store = useStore()
1 Like