M
M
mosikus2019-08-11 22:38:15
React
mosikus, 2019-08-11 22:38:15

React | How to show stub while iframe is loading?

I have a frame that takes a long time to load. How can I stub it in react at load time?

<div id="loadImg"><div><img src="loading.gif" /></div></div>
<iframe src="...." onload="document.getElementById('loadImg').style.display='none';"></iframe>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Malyshev, 2019-08-12
@deadochka

How to know that iframe loaded?
Here it is written how to listen to iframe. And then with the help of react already manage the wrapper

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question