Open madelson opened 9 months ago
I think the issue here (could be wrong) is arrow doesn’t destroy the previous template but memoizes it for future re-insertion (like <KeepAlive>
) which means effects are still running on it even when it isnt mounted. Probably something we should fix in future iterations.
Makes sense. I do think it would be desirable if the control flow could be respected. For the time being, is there any workaround to force arrow to ditch the template?
I have a conditionally-included template like this:
state
is a reactive object with an arrayitems
and an integer propertyindex
. What surprises me is that sometimes I am hitting a javascript error on this line:The problem is that
currentItem()
is null. However, I would have expected this not to be called because of thehasItem()
conditional. Am I misunderstanding something about how Arrow is supposed to work with conditional templates?