Skip to content

Instantly share code, notes, and snippets.

@lst15
Created May 21, 2018 14:15
Show Gist options
  • Select an option

  • Save lst15/87222eb5603f18b5eb0a25059dca2782 to your computer and use it in GitHub Desktop.

Select an option

Save lst15/87222eb5603f18b5eb0a25059dca2782 to your computer and use it in GitHub Desktop.
Tentando navigar
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Text,
View,
Button
} from 'react-native';
import {StackNavigator} from 'react-navigation';
import Scan from './tela2'
const routes = StackNavigator({
tela2 : Scan
})
export default class App extends Component {
static navigationOptions = {
title: 'Welcome',
};
render() {
const { navigate } = this.props.navigation;
return (
<Button
title="Go to Jane's profile"
onPress={() =>
navigate('tela2')
}
/>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment