How to make navigation between two screens in react native?
When compiling this code, I get the error: can't find variable ProfileScreen.
import { StackNavigator, } from 'react-navigation'; const App = StackNavigator({ Main: {screen: MainScreen}, Profile: {screen: ProfileScreen}, }); class MainScreen extends React.Component { static navigationOptions = { title: 'Welcome', }; render() { const { navigate } = this.props.navigation; return ( <Button title="Go to Jane's profile" onPress={() => navigate('Profile', { name: 'Jane' }) } /> ); } }