Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/react
SDK Version
7.23.0
Framework Version
React18, react-router-dom v6.4.4
Link to Sentry event
No response
Steps to Reproduce
- Follow instructions for usage with React Router 6.4 API here
- Once you have set up your
router
object (of typeRouter
), you will then use it in aRouterProvider
component as such
<RouterProvider router={router} />
See docs
Expected Result
No type errors on the RouterProvider
Actual Result
Observe the type error
It seems like the type error is due to a new introduction of encodeLocation
on the Router type in React Router DOM.
/**
* @internal
* PRIVATE - DO NOT USE
*
* Utility function to URL encode a destination path according to the internal
* history implementation
* @param to
*/
encodeLocation(to: To): Path;
I believe it was added in this PR. Hope this helps :)