Closed tyoeer closed 7 months ago
Thanks for pointing this out. Do you have a suggestion for where we should cover that in the book?
Somewhere next to create_effect
seems the most sensible to me. They're both part of the interaction between the reactive system and the non-reactive world.
Done in 20d7685a740093ec0df7a12208f7a6055e14856d
on_cleanup
is never mentioned, yet needed when dealing with for exampleset_timeout
/set_interval
. Their callback still gets run after navigating to a different page, even though any resources it accesses no longer exist, leading to an error. This can only be prevented by clearing them inon_cleanup
.