react-modal icon indicating copy to clipboard operation
react-modal copied to clipboard

Is it possibly render modal content in dom straightaway?

Open urffin opened this issue 6 months ago • 2 comments

Case: modal contain iframe with form. When modal open - iframe start loading. Every time on open modal iframe load again.

Is it possibly render modal in dom straightaway, so iframe load once, and then just show/hide element without remove from dom?

urffin avatar Jul 10 '25 17:07 urffin

Hi @urffin You can store the iframe on a state, but then you will be responsible to eventually let the iframe go (dispose).

diasbruno avatar Jul 11 '25 00:07 diasbruno

Hi @urffin You can store the iframe on a state, but then you will be responsible to eventually let the iframe go (dispose).

This not help with loading: main goal - show loaded iframe on open modal, but iframe not load until element not in dom, so iframe anyway load when it inserted

urffin avatar Jul 11 '25 07:07 urffin