I am using CRNA v0.44 . I am making a two screen signup . I am on 1st screen ,now I want to goto second screen using react-navigation.
But getting error:
undefined is not an object (evaluating 'this.props.navigation.navigate')
I have explored the internet and found need to pass prop to button but not able to figuring out how?
SignupForm.js:
import {
StackNavigator,
} from 'react-navigation'
import SignupForm2 from './SignupForm2'
const App = StackNavigator({
SignupForm2: { screen: SignupForm2 },
});
export default class SignupForm extends Component {
render () {
const { navigate } = this.props.navigation
return (
<Button
title="Go to Jane's profile"
onPress={() =>
navigate('SignupForm2', { name: 'SignupForm2' })
}
/>
)
}
}