1

I would like access to a method in my first screen class with React Navigation. Like when you press button on screen B, the script call ScreenA.refreshStuff() but i don't know how to access to this...

1 Answer 1

2

Screen A

this.props.navigation.navigate("ScreenB", {function: refreshStuff})}

Screen B

const { refreshStuff } = this.props.navigation.state.params;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.