Hi, thank you very much for this contribution, i was unable to listen for events like 'on swipe' event.
can anyone show me how to do so? i will be very thankful!!
It's ok guys i found it,
<Swiper
ref={node => {
if (node) this.swiper = node.swiper;
this.swiper.on('slideChange', function () {
console.log('slide changed');
});
}}
>
{renderedItems}
</Swiper>
Hi @mbenjrinija , u can add event from params like
params = {
on: {
'init': () => {}
'slideChange': () => {......}
}
}
More detail about event api is here
Hi
Why am I getting this error suddenly ....
index.js:1375 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()
Hi @mbenjrinija , u can add event from params like
params = { on: { 'init': () => {} 'slideChange': () => {......} } }More detail about event api is here
thanks!!!
Most helpful comment
Hi @mbenjrinija , u can add event from params like
More detail about event api is here