Skip to content

Unclear Support for React Router v7 with wrapUseRoutesV7 in Sentry Integration #901

@nichtsam

Description

@nichtsam

export default wrapUseRoutesV7(AppWithProviders)
https://github.com/epicweb-dev/epic-stack/blob/main/app/root.tsx#L273

I reviewed the documentation but couldn’t find any indication that this approach is supported.
According to Sentry’s documentation, wrapUseRoutes is meant to create a patched useRoutes hook.

Additionally, while exploring React Router’s documentation, I came across this:
https://reactrouter.com/upgrading/router-provider#1-move-route-definitions-into-route-modules
The React Router Vite plugin uses its own RouterProvider, meaning the creation of the Router is managed by the framework. I haven’t found anything that allows us to modify it directly.

Sentry’s documentation for React Router v7 notes that framework support is still limited, so it seems this might not be feasible for now.

References:
https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/v7/
https://docs.sentry.io/platforms/javascript/guides/react-router/
https://reactrouter.com/upgrading/router-provider#1-move-route-definitions-into-route-modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions