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
Expected behavior is that when we use the actionFetcher to submit to '/two' it should revalidate the loaderFetcher given the rules of shouldRevalidate. currentUrl.pathname !== nextUrl.pathname should revalidate due to navigation of children routes and currentUrl.pathname === formAction should revalidate when the action function is called on the given route.
In the given steps to reproduce the expected result looks something like the following
In the versions 6.8.0 to 6.9.0 (currently latest), the currentUrl and nextUrl instead give the pathname of the rendered route instead of the route corresponding to the action and loader.
I now can't get this to replicate, and instead I am getting the unexpected result, unfortunately I cannot provide the code in which I'm experience the expected behavior. Though if it isn't intended, I do believe it makes more sense for the currentUrl and nextUrl provided to shouldRevalidate should be the same as the path provided to the fetcher that's checking if it should revalidate, so possible feature request? This applies to currentParams and nextParams as well
Expected behavior can be found in version 6.7.0 and is lost in version 6.8.0 (I'm guessing one of my team members updated the package and I hadn't updated on my local directory) I'm still wondering if this is an intentional change as I feel this is less intuitive?
What version of React Router are you using?
v6.8.0 - v6.9.0
Steps to Reproduce
Expected Behavior (v6.7.0)
Expected behavior is that when we use the actionFetcher to submit to '/two' it should revalidate the loaderFetcher given the rules of shouldRevalidate.
currentUrl.pathname !== nextUrl.pathname
should revalidate due to navigation of children routes andcurrentUrl.pathname === formAction
should revalidate when the action function is called on the given route.In the given steps to reproduce the expected result looks something like the following
Actual Behavior (v6.8.0 - v6.9.0)
In the versions 6.8.0 to 6.9.0 (currently latest), the currentUrl and nextUrl instead give the pathname of the rendered route instead of the route corresponding to the action and loader.
Results:
The text was updated successfully, but these errors were encountered: