Repository navigation
|
I noticed that when switching routes the onCleanup for the previous component was not being called. Switch yet again, still no onCleanup. I just figured there was a problem with route; however, with a simple A an B test component, onCleanup is called when switching back and forth. So, what could possibly cause onCleanup to not be called when navigating? |
Answered by
xobjects
Aug 10, 2022
Replies: 1 comment
|
I just realized what is happening. To 'switch routes' I was using suid's Link and the href attribute set to the new page. This was causing a page reload. When I switched it to use onClick and navigate it worked. Is this the expected behavior? Either way, it works now. |
0 replies
Answer selected by
xobjects
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just realized what is happening.
To 'switch routes' I was using suid's Link and the href attribute set to the new page. This was causing a page reload. When I switched it to use onClick and navigate it worked. Is this the expected behavior? Either way, it works now.