Repository navigation
fix(vue): follow a new to in Link - #127
Open
leo-millennial wants to merge 5 commits into
Open
leo-millennial wants to merge 5 commits into
leo-millennial wants to merge 5 commits into
Conversation
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.
Link called useLink once in setup, so href and the route opened on click stayed on the first `to`. useLink now resolves the route on every read, and binds its open event with the scope found in setup through useProvidedScope. useProvidedScope comes with effector-vue 23.3.0, so the peer range starts there.
|
|
🦋 Changeset detectedLatest commit: 4504b8c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
❌ Deploy Preview for effector-router failed. Why did it fail? →
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<Link>follows a newtoprop. Before,hrefand the route opened on click stayed on the firstto, becauseLinkcalleduseLinkonce in setup. Related: #124.useLinkresolves the route on every read and bindsonOpenwith the scope thatuseProvidedScopereturns in setup. The publicuseLink(to)signature stays,Linkuses an internal variant that takes a getter. The new test switchestofrom/firstto/second/7and checkshrefand the opened route.useProvidedScopeappeared in effector-vue 23.3.0, so the peer range is now>=23.3.0and the changeset isminor.Includes #125 (the first four commits). Please review the last commit, I will rebase after #125 is merged.
Type of change
Checklist
pnpm buildpassespnpm typecheckpassespnpm testpasses and I added/updated tests for my changepnpm lintpassespnpm changeset), or an empty one for no-release changes (pnpm changeset --empty)