-
-
Couldn't load subscription status.
- Fork 1.3k
fix(router-core): parse _strictParams - alpha #5121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Comment |
|
View your CI Pipeline Execution ↗ for commit 6f19b58
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-ssr-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-ssr-query-core
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-static-server-functions
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
with changing useParams to make use of _strictParams it became apparent that _strictParams did not apply param parsing correctly. This PR resolves that problem and hence useParams now return the parsed params correctly. This PR also adds unit tests in both react-router and solid-router to test this expected result. A separate PR has been created to merge into alpha (#5121) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Stricter route parameter parsing and validation with support for custom parse/stringify. - Clearer per-route parameter error reporting, with optional throw-on-error behavior. - More consistent parameter values across nested routes and loaders. - Tests - Added integration tests validating useParams with nested routing, custom param parsing/stringifying, and loader data in both React and Solid routers. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
with changing useParams to make use of _strictParams it became apparent that _strictParams did not apply param parsing correctly. This PR resolves that problem and hence useParams now return the parsed params correctly. This PR also adds unit tests in both react-router and solid-router to test this expected result. A separate PR has been created to merge into alpha (TanStack#5121) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Stricter route parameter parsing and validation with support for custom parse/stringify. - Clearer per-route parameter error reporting, with optional throw-on-error behavior. - More consistent parameter values across nested routes and loaders. - Tests - Added integration tests validating useParams with nested routing, custom param parsing/stringifying, and loader data in both React and Solid routers. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This PR is to merge #5210 into alpha once accepted