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

271
Views
Deleting a Vue component dynamically

I am trying to render certain components which are present in an array using component tag of Vue js.

<div v-for="(arr, index) in compArray">
    <component v-bind:is="arr.name" :key="arr.name+index" :index="index"></component>
</div>

data() {
  compArray: [{name: "Abc"}, {name: "Xyz"}]
}

I am able to add new elements to this compArray and which will increase the components that are rendered. But when i am deleting, there is an issue with UI (data). Like, if there are 3 components and all three are having data property count.

Suppose for first element rendered this count is 4, for second it is 5 and for third it is 2. Then if i delete the second element from the compArray using slice method, data shown is still 5. In ideal case it should be 2, since middle one has been deleted.

What can be the issue behind this? Any help is appreciated

about 4 years ago · Juan Pablo Isaza
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!