TanStackT
TanStackโ€ข4mo agoโ€ข
18 replies
dead-brown

remount when navigating

hello everyone ๐Ÿ‘‹

we are experiencing an issue were our users click on our navigation bar to stay on the same page and they expect the state to reset

we have seen the reloadDocument option but it would slow down all our navigation so we don't want to do that

we have seen the remountDeps but it would make the route remount every time the deps change and we would lose performance

our use case is to only remount exactly when the user navigates to a page from the menu, when already on that very same page

we were thinking of incrementing a key to force remount but a built-in solution could possibly be cleaner

are there tools we could use in tanstack router or suggestions to cleanly adress the issue ?
Was this page helpful?