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
I read issue 5398 on React 18 + Strict Mode. Thank you for your correction in version 8.0.0
But if I use the <React.StrictMode> and have more than one image to lazy load, only the first image is displayed.
As you can see in my code the background is displayed correctly but not the poster image on the right.
Note: sometimes the background is not displayed either
Expected Behavior
Same as when <React.StrictMode> is not used
Actual Behavior
When I open the network panel, the poster is loaded but not displayed.
And the data-src attribute was not replaced by src
patcheco1001
changed the title
Lazy loading doesn't work with React 18 Strict Mode
Lazy loading doesn't work correctly with React 18 + Strict Mode + Swiper 8
May 22, 2022
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/zealous-shannon-opxyp2?file=/src/index.js
Bug description
I read issue 5398 on React 18 + Strict Mode. Thank you for your correction in version 8.0.0
But if I use the
<React.StrictMode>
and have more than one image to lazy load, only the first image is displayed.As you can see in my code the background is displayed correctly but not the poster image on the right.
Note: sometimes the background is not displayed either
Expected Behavior
Same as when
<React.StrictMode>
is not usedActual Behavior
When I open the network panel, the poster is loaded but not displayed.
And the
data-src
attribute was not replaced bysrc
Swiper version
8.1.5
Platform/Target and Browser Versions
Chrome
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: