Skip to content

fix(vue): give Outlet the children of the current grouped view - #126

Open
leo-millennial wants to merge 1 commit into
effector:mainfrom
leo-millennial:vue/outlet-grouped-children
Open

leo-millennial wants to merge 1 commit into
effector:mainfrom
leo-millennial:vue/outlet-grouped-children

Conversation

@leo-millennial

Copy link
Copy Markdown

Summary

<Outlet /> in a page of a withLayout group rendered the children of the first page of the group. Related: #124.

RouteRenderer provided routeView.children once in setup. Pages of one group share a renderer through the group key, so a page that took over a mounted group got the children of the previous page. The renderer now provides a getter, and Outlet reads it when it mounts. The new test renders second:a on main and second:b here.

The bug shows when a switch keeps the group mounted, as in the test "keeps a grouped layout mounted while sibling pages switch". With path navigation the old route closes a few microtasks before the new one opens, so the layout remounts and gets fresh children (#57). Once the layout stays mounted on path navigation too, this fix is needed there.

Type of change

  • 🐛 Bug fix

Checklist

  • I linked a related issue (or explained why there isn't one)
  • pnpm build passes
  • pnpm typecheck passes
  • pnpm test passes and I added/updated tests for my change
  • pnpm lint passes
  • I added a changeset (pnpm changeset), or an empty one for no-release changes (pnpm changeset --empty)

RouteRenderer provided the children of its first view once, in setup.
Views of one withLayout group share a renderer, so a page that took over
the group got an Outlet with the children of the previous page, and
rendered them if they were still open.

The renderer now provides a getter, and Outlet reads the children of the
view rendered at the time it mounts.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot

changeset-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0ede451

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@effector/router-vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for effector-router ready!

Name Link
🔨 Latest commit 0ede451
🔍 Latest deploy log https://app.netlify.com/projects/effector-router/deploys/6ae0a4eb39557b1ac7fe446c
😎 Deploy Preview https://deploy-preview-126--effector-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant