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
I encountered inconsistency on useLocation hook when programmatically navigating routes via navigate(-1) compared to history.back(-1) or hitting the browser's back button.
Is this intented? Given the current documentation states:
The text was updated successfully, but these errors were encountered:
billy-onggo
changed the title
useLocation() got fired twice when we call navigate(-1)
useLocation() got triggered twice when we call navigate(-1)
Dec 4, 2023
I encountered inconsistency on
useLocation
hook when programmatically navigating routes vianavigate(-1)
compared tohistory.back(-1)
or hitting the browser's back button.Is this intented? Given the current documentation states:
Steps to reproduce:
useLocation
. Subscribe to the instance.navigate(-1)
Expected Behaviour
The
navigate(-1)
method should trigger the location change only onceNote:
Sample Code
Screenshots
Desktop
The text was updated successfully, but these errors were encountered: