I have the following structure
<my-app>
<my-modal> <!--
<my-form></my-form>
</my-modal>
</my-app>
my-modal
is designed as a generic wrapper, which I use to wrap many different dialogues within my app. In it I listen for a location change, and render html '<slot></slot>'
My problem is that, although my-modal
is behaving correctly by showing and hiding the form, the form itself is never re-rendered, and so is always displayed showing stale content. I am currently kludging something using IntersectionObserver
to fire when visible, but this feels really hacky and is causing other issues.
Is there a way that my-modal can force its children to re-render, even though the only child it knows about is <slot></slot>
. I don't want my-app
to know anything about my-modal
's behaviours.