Skip to content

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

Open
yangshun wants to merge 1 commit into
voidzero-dev:mainfrom
yangshun:feat/island-form-route-url
Open

yangshun wants to merge 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>

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