Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: onboardingRef.current.goToPage is not a function. (In 'onboardingRef.current.goToPage(0, true)', 'onboardingRef.current.goToPage' is undefined) #124

Open
alexander01202 opened this issue Mar 28, 2022 · 2 comments

Comments

@alexander01202
Copy link

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 ??

@jfilter
Copy link
Owner

jfilter commented Mar 28, 2022

It looks like a type error. You can disable type checking for a file be adding the following to it's start:

// @ts-nocheck

@poinch
Copy link

poinch commented May 3, 2022

@jfilter Hey, looks like goToPage is not available as Type.

export default class Onboarding extends Component {
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants