Add @effector/router-vue draft package#44
Draft
sergeysova wants to merge 2 commits into
Draft
Conversation
Add a new `@effector/router-vue` package that mirrors the `@effector/router-react` API for Vue 3. Only the latest Vue 3 (`^3.5`) is supported. - Components: RouterProvider, Link, Outlet - View builders: createRouteView, createLazyRouteView, createRoutesView, withLayout - Composables: useRouter/useRouterContext, useLink, useIsOpened, useOpenedViews - Reactivity and Scope handling delegated to effector-vue - Tests (@vue/test-utils), README, docs pages and changeset Wire the package into the monorepo: root devDependencies (vue, effector-vue, @vitejs/plugin-vue, @vue/test-utils), `:vue` script, and the VitePress sidebar.
|
|
🦋 Changeset detectedLatest commit: 5da11e1 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 |
Present the new Vue bindings everywhere the React/React Native bindings are listed: root README (packages table, workspace shortcuts, project tree), core package README, and the getting-started guide (Vue install section).
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
Draft of a new
@effector/router-vuepackage — Vue 3 bindings for@effector/router, mirroring the@effector/router-reactAPI surface but using Vue idioms (provide/inject,defineComponent,h(),effector-vue/composition).Only the latest Vue 3 (
^3.5) is supported (peer dependencyvue: "^3.5.0").Reference: argon-router Vue bindings (movpushmov/argon-router#11) — adapted to
@effector/routercore and cleaned up.What's included
packages/vue/:RouterProvider,Link,OutletcreateRouteView,createLazyRouteView,createRoutesView,withLayoutuseRouter/useRouterContext,useLink,useIsOpened,useOpenedViewsScopehandling delegated toeffector-vue@vue/test-utilstests,README,vite.config.tsMonorepo wiring:
devDependencies:vue,effector-vue,@vitejs/plugin-vue,@vue/test-utils;:vuescriptdocs/vue/*pages (section "Vue β")minor, new package at0.1.0)Notes / decisions
console.logs, non-reactivecreateRoutesView(now recomputed viacomputedin the render function), and a workingRouterProvider.useLinkcompares route identity viatoRaw()— when the router is provided through deeply-reactive props (e.g. under@vue/test-utils),knownRoutesentries arrive proxied and a raw===check would fail.useOpenedViewsusescombine+effector-vue'suseUnitso scope handling stays idiomatic (vs. the manualcreateWatchin the React package)..ts+h()(not.tsx) because the roottsconfigtargetsreact-jsx.Verification
pnpm typecheck— cleanpnpm lint— 0 errorspnpm test— paths + core (47) + react (17) + vue (3) all passpnpm --filter @effector/router-vue build— ES + CJS +.d.tsOpen questions
0.1.0and docs are marked "β" — intended as a draft for review before first publish.