react-native-onboarding-swiper
react-native-onboarding-swiper copied to clipboard
TypeError: onboardingRef.current.goToPage is not a function. (In 'onboardingRef.current.goToPage(0, true)', 'onboardingRef.current.goToPage' is undefined)
I am trying to go to the previous page programmatically but everytime I get this error.
<TouchableWithoutFeedback onPress={() => onboardingRef.current.goToPage(0, true)}> <View style={styles.backButton}> <AntDesign name="arrowleft" style={{ top:Dimensions.get('window').height < 596 ? 30 : 0,shadowColor:'black' }} size={24} color="black" /> </View> </TouchableWithoutFeedback>
This is my code. Any ideas ??
It looks like a type error. You can disable type checking for a file be adding the following to it's start:
// @ts-nocheck
@jfilter Hey, looks like goToPage is not available as Type.
export default class Onboarding extends Component<Props> { flatList?: FlatList; goNext: () => void; }
i need to show a custom prev button even if i'm at the last page. Alternative to how achieve that?
Thanks