Skip to content

Support createHashRouter #8317

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

Closed
Angelodaniel opened this issue Jun 12, 2023 · 1 comment · Fixed by #8362
Closed

Support createHashRouter #8317

Angelodaniel opened this issue Jun 12, 2023 · 1 comment · Fixed by #8362
Assignees
Labels
Package: react Issues related to the Sentry React SDK Sync: Jira apply to auto-create a Jira shadow ticket Type: Improvement

Comments

@Angelodaniel
Copy link
Member

Angelodaniel commented Jun 12, 2023

Problem Statement

Docs
While createHashRouter isn't supported by Sentry yet, you can instrument createMemoryRouter using the wrapCreateBrowserRouter function.

However some customers cannot work with the proposed workaround as it would mean that the address bar in the browser wouldn’t change anymore which is not desired as an outcome.

Solution Brainstorm

┆Issue is synchronized with this Jira Improvement by Unito

@onurtemizkan
Copy link
Collaborator

I tried to wrap createHashRouter with wrapCreateBrowserRouter, and it looks like it's working fine with the current react-router version. -> Link to transaction

Will update the docs, and write tests for createHashRouter usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: react Issues related to the Sentry React SDK Sync: Jira apply to auto-create a Jira shadow ticket Type: Improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants