T
TanStack3y ago
wee-brown

Route unload

Is there a way to run a code on route unload? The original react-location library supported unloader which seems to be removed in the new router. Thank you!
1 Reply
wee-brown
wee-brownOP3y ago
It seems that if onLoadedaction returns a function, it gets called then the route is unloaded. Is that correct? So the returning function does not actually help - it is called even if a route param is changed (but the actual route remains).

Did you find this page helpful?