Skip to content
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

fix(react): Tanstack Router integration matchRoutes signature changed #14328

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lsmurray
Copy link

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 location

https://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

  1. use the new matchRoutes signature instead of the deprecated signature
  2. use parseSearch to support applications that use custom search param serialization.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

@lsmurray lsmurray force-pushed the luke/fix-tanstack-match-routes branch from 5ba4f26 to 67bb292 Compare November 16, 2024 21:28
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