Skip to content

feat(pages): check useIslandForm URLs when typedRoutes is on - #733

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
yangshun:feat/island-form-route-url
Nov 7, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
yangshun:feat/island-form-route-url

Conversation

@yangshun

@yangshun yangshun commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Type useIslandForm() submit URLs as RouteUrl in every adapter, including Vue and Svelte submit().
  • With routing.typedRoutes off, RouteUrl stays string. With it on, post, put, patch, delete, and submit reject URLs that do not match a route. A path built at runtime can opt out with as RouteUrl.

Test plan

  • vp test run packages/void/test/integration/route-url-builder.test.ts -t "useIslandForm|checks URL strings against routes"
  • Typecheck @void/react, @void/vue, @void/solid, and @void/svelte

I'm not sure if this is considered a breaking change, but I think this should have been done when we added typedRoutes.

Island form submissions take RouteUrl, so the URL is checked against the app's routes only when routing.typedRoutes is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@cpojer
cpojer merged commit 06e0f75 into voidzero-dev:main Nov 7, 2026
18 checks passed
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.

2 participants