Currently, my Vue app has a structure that includes a "blackout" component for displaying modals and a router-view for various sub-menus. These components are siblings at the same level.
<blackout v-if="this.popup.currentPopup"></blackout>
....
<router-view class="folder">
...child-component fetching data with a GET request
</router-view>
Within the dynamically loaded component in "blackout" (using the :is directive), there is a save button used to send data via a POST method. After clicking this save button, I need to refresh the data in the child component of the "router-view". How can I notify the sibling component that the modal component has made a post request and was closed?
After conducting some research, I came across a few potential solutions: using an event bus (considered an antipattern), watching the store state (storing the modal's state in Pinia), or communicating through this.$root (only available in Vue 2).