question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Vue routing in tabs mode cause re-render

See original GitHub issue

Bug 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: Ionic conference app bug

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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
michaeltintiuccommented, Jul 10, 2019

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

1reaction
xarcommented, May 29, 2019

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found