react-swipeable-views
react-swipeable-views copied to clipboard
onChangeIndex callback don't response
Hello community my mistake is simple, when using the onChangeIndex prop and calling the callback it doesn't work.
attached code
const handleStepChange = (step) => {
setActive(step);
console.log('hello world')
};
For example, changing the status is no problem, but if I try to print on the console its step parameter does not.
Does anyone know why? The above is just an example, my concern is that the function does not respond to me.
<SwipeableViews onChangeIndex={handleStepChange} ... /> ...
Am I doing something wrong?
Seems so. Here's that function working in a sandbox.