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
This will allow us to style each component more easily and reduce complex props on Swiper component (objects inside objects) which are hard to optimise.
We would no longer need to do these checks like needsNavigation because we will do it in the user land.
Also, SwiperNavigation could hide SwiperCore.use([Navigation]); from the user.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How hard would it be to refactor Swiper React to Compound Component
Instead of initialising navigation like this
We can have this:
This will allow us to style each component more easily and reduce complex props on Swiper component (objects inside objects) which are hard to optimise.
We would no longer need to do these checks like needsNavigation because we will do it in the user land.
Also,
SwiperNavigation
could hideSwiperCore.use([Navigation]);
from the user.Only problem could be with renderSlides but that could be handled with context and useDescendants
Beta Was this translation helpful? Give feedback.
All reactions