For some reason, the current usage of either (a) setRef or (b) createPortal in general is causing the DeclarativeFrame component to fail in subsequent renders, i.e. if you pay close enough attention, the contents of each <iframe> renders and then disappears / is removed from the DOM.
I'm not sure if I would look too deeply into the cause of the disappearance / removal of elements as it is probably an issue with Preact's (and React's, if you see the mentioned gist ahead) createPortal implementation, or a very weird bug in Firefox; I've seen some mentions on a GitHub gist of switching to onLoad (which has not worked out for me), so that might be something to look into.
For some reason, the current usage of either (a)
setRefor (b)createPortalin general is causing theDeclarativeFramecomponent to fail in subsequent renders, i.e. if you pay close enough attention, the contents of each<iframe>renders and then disappears / is removed from the DOM.I'm not sure if I would look too deeply into the cause of the disappearance / removal of elements as it is probably an issue with Preact's (and React's, if you see the mentioned gist ahead) createPortal implementation, or a very weird bug in Firefox; I've seen some mentions on a GitHub gist of switching to onLoad (which has not worked out for me), so that might be something to look into.