Closed DavidWnek closed 3 years ago
:wave: @DavidWnek, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out. Please feel free to clarify your issue if you think it was closed prematurely.
@timdorr This is not support.... This is a bug
Yea, it's a bug... we ran into it too
I'm experiencing the same issue. Redirect
calls history methods, but components aren't properly re-rendered. As a workaround I test history.location.pathname
equality.
react-router: 5.2.1, jest/jsdom environment
Version
5.2.0
Test Case
https://codesandbox.io/s/peaceful-ptolemy-061ef?file=/src/MiniApp.js
Steps to reproduce
Backstory. I'm working on an application that has many small widgets that talk with each other and need to swap out other widgets all from a central dashboard.
My original thought was to make several small Router's with Memory History, and each widget can talk other widgets to change what path to render.
In my example, there's 4 App Windows with 5 "Apps" in it. When you click an App, it should go to the next page, do it's specific things, I added "dummy" controls to simulate what that App could potentially do, by opening a different app in a different window.
Expected Behavior
When you click a link to redirect to a new route, that route shows instead of the not found catch all.
Actual Behavior
When you click an App, it routes to the Not Found widget.
It looks like the history is tracking the change was made.
i.e.