Skip to content

perf(RouterView): avoid parent rerenders when possible#2082

Open
posva wants to merge 3 commits into
mainfrom
perf/router-view-rerenders
Open

perf(RouterView): avoid parent rerenders when possible#2082
posva wants to merge 3 commits into
mainfrom
perf/router-view-rerenders

Conversation

@posva

@posva posva commented Dec 15, 2023

Copy link
Copy Markdown
Member

Close #1701

@netlify

netlify Bot commented Dec 15, 2023

Copy link
Copy Markdown

Deploy Preview for vue-router canceled.

Name Link
🔨 Latest commit 1191594
🔍 Latest deploy log https://app.netlify.com/sites/vue-router/deploys/657c544dce062d0008af5cae

@codecov-commenter

codecov-commenter commented Dec 15, 2023

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.29%. Comparing base (e978eb8) to head (b514499).
⚠️ Report is 638 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2082   +/-   ##
=======================================
  Coverage   97.28%   97.29%           
=======================================
  Files          26       26           
  Lines        6077     6090   +13     
  Branches      836      836           
=======================================
+ Hits         5912     5925   +13     
  Misses        162      162           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Narretz

Narretz commented Oct 16, 2024

Copy link
Copy Markdown

Hi @posva is this still relevant? Perf fixes are always good and I wonder if this fixes a bug I'm seeing ...

@netlify

netlify Bot commented Oct 29, 2024

Copy link
Copy Markdown

Deploy Preview for vue-router canceled.

Name Link
🔨 Latest commit b514499
🔍 Latest deploy log https://app.netlify.com/sites/vue-router/deploys/6734899965314d0008004132

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2024

Copy link
Copy Markdown

Open in Stackblitz

pnpm add https://pkg.pr.new/vue-router@2082

commit: b514499

@posva

posva commented Oct 29, 2024

Copy link
Copy Markdown
Member Author

@Narretz can you try using the pkg-pr published version?

@Narretz

Narretz commented Dec 2, 2024

Copy link
Copy Markdown

@posva my problem was actually solved in a vue 3.5+ update

@Narretz

Narretz commented Mar 22, 2025

Copy link
Copy Markdown

Hi @posva this has actually become relevant (to me) again, and as you can see from #1701, devs are still experiencing this as a problem and reporting it. I tested my case with the MR build and it fixes it.. So can this be merged and released? I guess there's a chance that some apps actually rely on the re-render behavior by now, but it still feels like a bug/unexpected behavior to me.

@Narretz

Narretz commented Mar 31, 2025

Copy link
Copy Markdown

Hi @posva can you give this another thought/look? See my comment above

@posva posva moved this from 🆕 Triaging to 💬 In discussion in Vue Router Roadmap Mar 31, 2025
@posva

posva commented Mar 31, 2025

Copy link
Copy Markdown
Member Author

This still requires more testing in different scenarios with Keep Alive, Transition, and Suspense to ensure everything keeps working. I haven't had the time to test all the combinations yet. There are other pending comments in the named issue. I will eventually get back to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 💬 In discussion

Development

Successfully merging this pull request may close these issues.

View Component unnecessarily updates when child route changes

3 participants