Replies: 1 comment 2 replies
-
One idea I came up with was to create a hook that checks to see if the path or hash has changed when the subscription fires. If not, don't do the transition animation, but I figured I'd see if there was a better approach to this before I did that.. seems like more work :D |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Basically, I'm trying to use query params to partially drive the UI. On my page, I have a table that loads on page load. When I click a row, I'm adding the query param
thingID=whatever
. The page works on load via theuseSearch()
hook to update and display (in this case) and open slide pane if the param is present.however, when that param is "navigated" to either via a Link component, or a call to useNavigate, the subscription catches the event and causes my transition animation to fire, resulting in what visually appears to be a full page reload.
Is there a better subscription to use that only fires on actual page changes, or a better way to manipulate search/query params that doesn't trigger a navigation?
I'm using
"@tanstack/react-router": "^1.51.2",
Beta Was this translation helpful? Give feedback.
All reactions