This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Core */ | |
import SagaTester from 'redux-saga-tester'; | |
import MockAdapter from 'axios-mock-adapter'; | |
/* redux */ | |
import configureStore from 'redux-mock-store'; | |
import rootSaga from 'store/sagas'; | |
import api from 'services/api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Core */ | |
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
/* Redux */ | |
import { connect } from 'react-redux'; | |
import UserActions from 'store/ducks/user'; | |
/* Presentational */ | |
import { View, Button, TextInput } from 'react-native'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Core */ | |
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
/* Redux */ | |
import { connect } from 'react-redux'; | |
import UserActions from 'store/ducks/user'; | |
/* Presentational */ | |
import { View, TextInput } from 'react-native'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Provider } from 'react-redux'; | |
import 'config/DevToolsConfig'; | |
import 'config/ReactotronConfig'; | |
import Routes from 'routes'; | |
import { PersistGate } from 'redux-persist/lib/integration/react'; | |
import { store, persistor } from 'store'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Button, Text } from 'react-native'; | |
import { createStackNavigator } from 'react-navigation'; | |
const Page1 = ({ navigation }) => ( | |
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> | |
<Text>Home ;D</Text> | |
<Button title={() => { navigation.navigate('About'); }} /> | |
</View> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/Page1.js | |
import React from 'react'; | |
import { View, Button, Text } from 'react-native'; | |
const Page1 = ({ navigation }) => ( | |
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> | |
<Text>Home ;D</Text> | |
<Button | |
title="Ir para About" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/Page2.js | |
import React from 'react'; | |
import { View, Button, Text } from 'react-native'; | |
const Page2 = () => ( | |
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> | |
<Text>About</Text> | |
</View> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.js | |
import { AppRegistry } from 'react-native'; | |
import Navigator from './src'; | |
const App = Navigator.StackNavigator; // Descomente para usar o StackNavigator. | |
// const App = Navigator.TabNavigator; // Descomente para usar o TabNavigator. | |
// const App = Navigator.DrawerNavigator; // Descomente para usar o DrawerNavigator. | |
AppRegistry.registerComponent('navegacao', () => App); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/index.js | |
import Page1 from './Page1'; | |
import Page2 from './Page2'; | |
import { createStackNavigator } from 'react-navigation'; | |
const StackNavigator = createStackNavigator({ | |
Home: Page1, | |
About: Page2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/index.js | |
import Page1 from './Page1'; | |
import Page2 from './Page2'; | |
import { createBottomTabNavigator } from 'react-navigation'; | |
const TabNavigator = createBottomTabNavigator({ | |
Home: Page1, | |
About: Page2, |
OlderNewer