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
Hi. Simple way of finding selected screen could be by making use of onTransitionStart / onTransitionEnd component props. If we consider Autoplay slider
constAutoplaySlider=withAutoplay(AwesomeSlider);<AutoplaySliderplay={true}cancelOnInteraction={false}// should stop playing on user interactioninterval={6000}cssModule={AwesomeSliderStyles}>
and add mentioned props
onTransitionStart={e=>{console.log(`Changing from: ${e.currentIndex}`);}}onTransitionEnd={e=>{console.log(`Changed to: ${e.currentIndex}`);}}
We will have slide index logged to browser console. onTransitionStart replies current index just before transition and onTransitionEnd after slide change so you would get behaviour described below:
Changing from: 0
Changed to: 1
Changing from: 1
Changed to: 2
Besides currentIndex property u can access other interesting intel, here's quick look:
Is there anyway to find which screen it is selected on? Sorry, I am new to this.
The text was updated successfully, but these errors were encountered: