-
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? |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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.