You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When users are going to change tab inside the app (tabs are connected to searchParam), useBlocker shows prompt only one time, if users decided to stay on the current page and after that, at once, they are clicking on the same tab they wanted to navigate earlier, useBlocker even doesn't execute BlockerFunction.
Tried to connect tabs to pathParam instead of searchParam - it hasn't help
Tabs are rendering in the one MF
If users are tying to navigate to another page, from another MF - it always works correctly
If I start the MF in isolation, that means it uses BrowserRouter, everything works as expected
Expected Behavior
Users should see a prompt by useBlocker each time when they want to change searchParam, event it's the same searchParam's key and value
Actual Behavior
If it's the same searchParam's key and value, users see a prompt by useBlocker only one time
The text was updated successfully, but these errors were encountered:
What version of React Router are you using?
6.13.0
Steps to Reproduce
Microfrontends
Host
(Shell
app) is usingBrowserRouter
MFs
are usingMemoryRouter
When users are going to change
tab
inside the app (tab
s are connected tosearchParam
),useBlocker
showsprompt
only one time, if users decided to stay on the current page and after that, at once, they are clicking on the sametab
they wanted to navigate earlier,useBlocker
even doesn't executeBlockerFunction
.Tried to connect
tab
s topathParam
instead ofsearchParam
- it hasn't helpTab
s are rendering in the oneMF
If users are tying to navigate to another page, from another MF - it always works correctly
If I start the
MF
in isolation, that means it usesBrowserRouter
, everything works as expectedExpected Behavior
Users should see a
prompt
byuseBlocker
each time when they want to changesearchParam
, event it's the samesearchParam
'skey
andvalue
Actual Behavior
If it's the same
searchParam
'skey
andvalue
, users see aprompt
byuseBlocker
only one timeThe text was updated successfully, but these errors were encountered: