bug: Vue routing in tabs mode cause re-render
See original GitHub issueBug Report
Ionic version: [x] 4.4
Current behavior: Simple tabs structure in vue project with ionic vue router. When I switch tab previous component is removed from DOM and after that It needs to be fully re-rendered when I go back to that tab. It’s reproducible also on ionic-vue-conference app. But working correctly on ionic-conference-app.
Expected behavior: Component doesn’t get removed but will be hidden.
Steps to reproduce:
Related code:
<ion-tabs>
<ion-tab tab="dashboard">
<!-- <DashboardIndex />-->
<ion-vue-router name="dashboard" />
</ion-tab>
<ion-tab tab="benefits" :routes="['page2']">
<ion-vue-router name="page2" />
</ion-tab>
<ion-tab tab="results" :routes="['page3']">
<ion-vue-router name="page3" />
</ion-tab>
<ion-tab tab="profile" :routes="['page4']">
<ion-vue-router name="page4" />
</ion-tab>
<template slot="bottom">
<ion-tab-bar :key="1">
<ion-tab-button v-for="tab in tabs" :key="tab.routeName" :tab="tab.routeName">
<ion-label>{{ tab.title }}</ion-label>
<ion-icon name="home"></ion-icon>
</ion-tab-button>
</ion-tab-bar>
</template>
</ion-tabs>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
bug: Vue routing in tabs mode cause re-render · Issue #18292
The reason for switching to router-view is due to a hard requirement of the transition element being the parent of keep-alive as per...
Read more >Vue js does not re-render the page height after routing to ...
I think the problem you're facing is due to the fact that the page doesn't get refreshed when you use: (As it is...
Read more >Changelog | Vue Router Tab - GitHub Pages
Bug Fixes. RouterAlive: Solve the problem of failing to remove the cache due to the Vue v2.6.13 version of KeepAlive streamlining the data...
Read more >How to rerender components when vue router params ...
In this lesson, we learn how to re-render components when Vue Router params of the same route changes. We learn about the special...
Read more >Ionic-react - so many render issues related to routing
Then my current bugs are… First, it seems if I trigger multiple re-renders from multiple useEffects loading async data, it causes the transition ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I totally forgot to mention the PR here, it’s been open for quite a few days now 😉 https://github.com/ionic-team/ionic/pull/18561
@michaeltintiuc aa, you are correct. I understand now. In the end I have used router-view and probably will end making some ionic like transitions other way