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

[Bug]: Cannot navigate in windows production #11390

Closed
ImJeremyHe opened this issue Apr 1, 2024 · 2 comments
Closed

[Bug]: Cannot navigate in windows production #11390

ImJeremyHe opened this issue Apr 1, 2024 · 2 comments
Labels

Comments

@ImJeremyHe
Copy link

What version of React Router are you using?

6.22.1

Steps to Reproduce

Building an electron app with these related packages

"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.1",

Code looks like this

const navigate = useNavigate()
navigate(`myUrl`)

Expected Behavior

Work in the windows production

Actual Behavior

navigate can not render the page without any error in windows production.
Weird thing is that in windows development environment and macos, it works.

@ImJeremyHe ImJeremyHe added the bug label Apr 1, 2024
@timdorr
Copy link
Member

timdorr commented Apr 2, 2024

The host operating system should have no effect on this library, as the browser abstracts that away from us. Without a reproducible test case, we can't assume this is a bug with the library anyways. It is very likely something with your local setup, such as a browser extension.

@timdorr timdorr closed this as completed Apr 2, 2024
@ImJeremyHe
Copy link
Author

ImJeremyHe commented Apr 3, 2024

@timdorr Thanks for your reply.
After debugging, I found that navigate actually works in windows production, just navigate to a wrong component(which is same as the current displayed one, so it looks like it doesn't work).
If I have time, I will make a minimum reproducible repo


For who using electron and encountering the same problem:
https://stackoverflow.com/questions/36505404/how-to-use-react-router-with-electron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants