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
When I rendered the components that are dynamically imported through React.lazy inside Swiper or SwiperSlide, the following error occurred.
I don't know the internal code in detail, but when I looked at it, it is assumed that the cleanup function of useLayoutEffect is executed, causing re-rendering, and an unintended error occurred as the cloneElement is executed.
Expected Behavior
It should be rendered the same, with no exceptions to dynamic import components.
Jungho-Cheon
changed the title
Hydration-related errors occur when Suspense and React.laze are used internally during SSR.
Hydration-related errors occur when Suspense and React.lazy are used in Next.js.
Apr 12, 2024
Check that this is really a bug
Reproduction link
codesandbox
Bug description
When I rendered the components that are dynamically imported through React.lazy inside Swiper or SwiperSlide, the following error occurred.
I don't know the internal code in detail, but when I looked at it, it is assumed that the cleanup function of useLayoutEffect is executed, causing re-rendering, and an unintended error occurred as the cloneElement is executed.
Expected Behavior
It should be rendered the same, with no exceptions to dynamic import components.
Actual Behavior
No response
Swiper version
11.1.1
Platform/Target and Browser Versions
macOS chome 123.0.6312.107
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: