fix(react): Tanstack Router integration matchRoutes signature changed #14328
+24
−21
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.
The current sentry implementation was breaking in my application because we use custom search param serialization.
The default tanstack implementation uses
this.options.parseSearch
to parse the search string into a parsed locationhttps://github.com/TanStack/router/blob/55891518fcfa7c308e1db4149d357cf38700c882/packages/react-router/src/router.ts#L1015-L1016
The
matchRoutes
signature that sentry was using has been deprecated.https://github.com/TanStack/router/blob/55891518fcfa7c308e1db4149d357cf38700c882/packages/react-router/src/router.ts#L1063-L1098
The signature only exists to support sentry as far as I can tell
TanStack/router#2164
TanStack/router#2165
This PR implements two fixes
matchRoutes
signature instead of the deprecated signatureparseSearch
to support applications that use custom search param serialization.Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint
) & (yarn test
).