Is Observer generally discouraged to use for React Swiper Component? #8069
Unanswered
allenOrangeXu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi:
I've been playing around with React Swiper Component and have some question about the "Observer" parameter.
I have a sample code below:
Basically all it does is, add/remove a slide when click on the button and log the event if swiper has slide update. I checked my console and there's no console update when slide is added or removed. Based on the documentation (https://swiperjs.com/swiper-api#param-observer), seems it's suppose to get triggered? Is it not supposed to use with React and I should use useEffect/useLayoutEffect instead?
Beta Was this translation helpful? Give feedback.
All reactions