Doubts and Clarifications
Last updated
Was this helpful?
Last updated
Was this helpful?
In PIG Game, we set image src like this,
The doubt is, when do we use load event since setting img src
is async operation?
If you want to do something after the image loads, the you capture load event and write the required code in a callback function.
If you don't want to know when the image has been loaded and not interested in performing any operations after the image has been loaded then you can proceed without capturing the load event. Example below
You can create the deep copy yourself manually but it's too much of work. Look at JavaScript notes and I've explained various ways to do that.
React slider project john's milga