After confirming in vue 3 compositon api
router.push('/IssueList');
Here, I want my and components to refresh when they come to the IssueList page.
I'm redirecting to the page, but it doesn't refresh the issuelist page. How can I do that?
The codes on my IssueList page are as follows.
<template>
<div>
<div class="card">
<h5>Konu Listesi</h5>
<Button label="Yeni Konu Oluştur" class="p-button-success p-button-outlined mb-2" icon="pi pi-plus"
@click="newIssue"></Button>
<TabView ref="tabview1">
<TabPanel header="Bana Gelenler">
<issue-incoming></issue-incoming>
</TabPanel>
<TabPanel header="Benim Yazdıklarım">
<issue-send ></issue-send>
</TabPanel>
</TabView>
</div>
</div>
</template>
if i understand your question correctly you should tie a :key value pair to the component you want to refresh. so essentially when whatever happens in the example function it will increment the change variable which is tied to the component and forces it to refresh.
example -
<template>
<div>
<div @click="example()"> <p>update</p> </div>
<Component :key="change" />
</div>
</template>
<script>
import { ref } from "vue";
export default {
components: {
Component,
},
setup() {
var change = ref(0);
function example() {
change.value += 1;
}
return {
change,
example,
};
},
};
</script>