Skip to content

fix(vue): drop effector-vue 23.1.1 workarounds - #125

Open
leo-millennial wants to merge 4 commits into
effector:mainfrom
leo-millennial:vue/effector-vue-23-3
Open

leo-millennial wants to merge 4 commits into
effector:mainfrom
leo-millennial:vue/effector-vue-23-3

Conversation

@leo-millennial

Copy link
Copy Markdown

Summary

effector-vue 23.3.0 fixes the defects router-vue worked around, so this PR removes three workarounds. Related: #124.

  • Tests import EffectorScopePlugin from effector-vue/composition. The createRequire call and the Plugin cast are gone.
  • useLink passes the current query to stringifyQuery without the DeepReadonly cast.
  • useOpenedViews passes the route stores to useUnit as a list. Before, every RoutesView and Outlet mount created a combine store that stayed linked to the route stores. The new test counts stores created during three mounts with inspectGraph: 3 on main, 0 here.
  • README and the Vue docs page import the plugin from the composition entry and mention forceScope.

The effector-vue dev dependency is now ^23.3.0. The peer range stays >=23, the list form of useUnit exists since 23.0.0. router-react has the same combine per mount in useMemo, this PR changes Vue only.

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)

effector-vue 23.3.0 exports the scope plugin from the composition entry,
and its ESM entries load in Vitest with Vue 3. The tests no longer need
createRequire and a cast to reach the CJS build.

Bump the effector-vue dev dependency to ^23.3.0 and resolve the Vue
package's peer to the same version.
effector-vue 23.3.0 types a store ref as Readonly<Ref<T>>, so the
current query is a plain Query and passes to stringifyQuery as it is.
useOpenedViews combined the route stores into a new derived store on
every mount. Nothing cleared it, so each RoutesView or Outlet mount left
a node linked to the route stores.

The stores now go to useUnit as a list, which subscribes to them
directly and unsubscribes on unmount. The new test counts stores created
during three mounts with inspectGraph: three before, none after.
Point the Scope sections at the composition entry and mention the
forceScope option. Both need effector-vue 23.3.0.
@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: a04433d

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 failed. Why did it fail? →

Name Link
🔨 Latest commit a04433d
🔍 Latest deploy log https://app.netlify.com/projects/effector-router/deploys/6ae0a4e86c9e616549347bc4

@leo-millennial leo-millennial mentioned this pull request Oct 27, 2026
6 tasks done

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