-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add support for new versions of react-router-dom #582
Comments
Related issue: #235 |
Hi @riboher the tab got auto closed. |
Hey @codecapitano - I encountered this issue while your release was still going through the pipeline. Talk about responsive support! :) But unless I'm mistaken, this does not seem to have fixed the issue, I'm still seeing it with 1.7.1:
Our code: const routes = (
<Route errorElement={<SideIkkeFunnet />}>
(...)
</Route>
);
export const router = createBrowserRouter(createRoutesFromElements(routes), {basename: basePath}); I've deleted Our codebase is full of oddities, so perhaps our routes are set up real odd and I'm offering an edge case here. |
Hi @riboher thansk a lot for the quick testing. I can confirm the issue. We'll fix it. |
One question: Asking because if you use data routers you don't need provide import { matchRoutes } from 'react-router-dom';
import { getWebInstrumentations, initializeFaro, ReactIntegration, ReactRouterVersion } from '@grafana/faro-react';
initializeFaro({
// ...
instrumentations: [
// Load the default Web instrumentations
...getWebInstrumentations(),
new ReactIntegration({
router: {
version: ReactRouterVersion.V6_data_router,
dependencies: {
matchRoutes,
},
},
}),
],
}); |
Would you mind sharing your Faro init code? |
Pull Request: #585 |
Hi @codecapitano! I think you tagged me by mistake 😅 . Let me try the new fix and I'll let you know if at least I run into any issues. Thanks for the quick solution! |
Oh that's awesome thank you so much ❤️ I added the link to the PR so that you are aware we are working on it. |
Hi @codecapitano, unfortunately the error still shows up 😞 . Let me show you my faro initialization code as well as the use of
Same error as before
|
Thanks so much for your help @riboher 🙏 It seems that for some reason it's still pulling the old With 1.7.1 Which is referencing the Index/NonIndex routers [2]. Maybe deleting |
That definitely fixed the issue @codecapitano! Thanks a lot for the suggestion. What a rookie mistake 😅 . You can close the issue if you want, everything seems fine on my side. Thank you again! |
Perfect glad it's working now. Thanks again for reporting and testing 🙏 |
Perfect, this resolved it. Thanks a bunch @codecapitano :) |
Great @toresbe thanks for confirming 🙏 |
Description
After updating
react-router-dom
to its last versionv6.23.0
, somegrafana-react
setup fails due to type errors.When using
withFaroRouterInstrumentation
, types of expectedRouter
don't match.Proposed solution
Update the necessary dependencies so
faro-react
works with most recentreact-router-dom
versionsThe text was updated successfully, but these errors were encountered: