1

In my main app page:

const App = StackNavigator({ sign-up: { screen: Signup }, });

on Signup page:

const { navigate } = this.props.navigation;

<Text onPress={() => navigate(‘sign-up’)} Sign Up</Text>

What am I missing?

2
  • 1
    You should not use - in name or variables, it can be signUp Commented Jul 27, 2017 at 8:13
  • Thanks @JigarShah , I'm beginner at react-native :) Commented Jul 27, 2017 at 8:21

1 Answer 1

4

Use it like mentioned in this github issue comment:

const SimpleApp = StackNavigator({
  Home: { screen: HomeScreen }, 
});

AppRegistry.registerComponent('SimpleApp', () => SimpleApp);
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.