Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

359
Views
How can ı do vue 3 compositon api router refresh page

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>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!