Skip to content

feat(solid): add @effector/router-solid draft package#45

Draft
sergeysova wants to merge 3 commits into
mainfrom
sova/loving-hopper-ffcdb8
Draft

feat(solid): add @effector/router-solid draft package#45
sergeysova wants to merge 3 commits into
mainfrom
sova/loving-hopper-ffcdb8

Conversation

@sergeysova

Copy link
Copy Markdown
Member

Summary

Add SolidJS bindings for @effector/router, mirroring the @effector/router-react
API with Solid primitives (createMemo, Show, Dynamic, effector-solid useUnit).

Exposes RouterProvider, Link/useLink, Outlet, createRouteView,
createLazyRouteView, createRoutesView, withLayout, useRouter, useIsOpened and
useOpenedViews. Reactive helpers return Solid accessors instead of plain values.

Supports only the current stable major of SolidJS (1.x) via
peerDependencies "solid-js": "^1.9.0".

Wire-up: vite-plugin-solid build/test config (hot disabled for vitest),
per-package tsconfig with jsxImportSource "solid-js" (root tsconfig excludes it),
root devDependencies, ":solid" script and a changeset.

Type of change

  • ✨ Feature

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)

Add SolidJS bindings for @effector/router, mirroring the @effector/router-react
API with Solid primitives (createMemo, Show, Dynamic, effector-solid useUnit).

Exposes RouterProvider, Link/useLink, Outlet, createRouteView,
createLazyRouteView, createRoutesView, withLayout, useRouter, useIsOpened and
useOpenedViews. Reactive helpers return Solid accessors instead of plain values.

Supports only the current stable major of SolidJS (1.x) via
peerDependencies "solid-js": "^1.9.0".

Wire-up: vite-plugin-solid build/test config (hot disabled for vitest),
per-package tsconfig with jsxImportSource "solid-js" (root tsconfig excludes it),
root devDependencies, ":solid" script and a changeset.
Add a small two-page example (home + post view) exercising the router:

- guards /post/:id with chainRoute + an existence-check effect, so the
  guarded (virtual) route only opens when the post exists;
- renders the guarded route in createRoutesView, so a missing post id and a
  malformed/unknown url both fall through to the `otherwise` 404 fallback;
- covers home, existing post, missing post -> 404, bad url -> 404, and
  recovery from 404 back to a real page.
@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 Jul 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af2789d

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-solid Minor

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 SolidJS binding alongside the other packages:

- root README: packages table, workspace shortcuts, and project structure tree;
- docs sidebar: add a "Solid β" section;
- docs: add a Solid overview page mirroring the React one.
@sergeysova sergeysova changed the title add @effector/router-solid draft package feat(solid): add @effector/router-solid draft package Jul 4, 2026
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