r/reactjs •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

255 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Sep 13 '20

[deleted] — view deleted comment

1

u/badboyzpwns Sep 14 '20

Thank you!! one last note! why specifically have 2000 as the setTimeout() shouldn't it be 0? Because when it loads, we want to immediately make isImageLoaded = true?

0

u/[deleted] Sep 14 '20

[deleted] — view deleted comment

2

u/badboyzpwns Sep 14 '20

Got it! thank you regardless!!