You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, when there're multiple images, the state - loadCounter won't keep consistent between different images, say I have four images, in some cases, say we have 4 images, the state loadCounter would be 2 rather than 4, because when the 3rd, and 4th image got loaded, the state is 1 at the moment of reading the value, any thoughts?
The text was updated successfully, but these errors were encountered:
Yes, there can be an asynchronicity issue. If the component is converted to use hooks, then there can be a guarantee that the counter will stay in sync
react-on-images-loaded/src/OnImagesLoaded.tsx
Line 180 in e52de29
So, when there're multiple images, the state - loadCounter won't keep consistent between different images, say I have four images, in some cases, say we have 4 images, the state loadCounter would be 2 rather than 4, because when the 3rd, and 4th image got loaded, the state is 1 at the moment of reading the value, any thoughts?
The text was updated successfully, but these errors were encountered: