TanStackT
TanStack4y ago
2 replies
full-green

Managing case when query is dependent on nextjs router.query but should update conditionally

What I want to achieve is that my query keys are dependent on router.query and not change if react.query.isTab is the same. It is a true false value, Currently whenever I click on any Tab in as shown in SS1 the nav bar is lost because mesages from that channels are fetched, I need to maintain some sort of state say react.query.isTab so that the nav bar data doesnt update if users is switching between the tabs. It should only update if users search for a new query,
image.png
image.png
Was this page helpful?