This file contains hidden or 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 { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
TouchableHighlight, | |
Dimensions | |
} from 'react-native'; |
This file contains hidden or 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 { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
TouchableHighlight, | |
Dimensions | |
} from 'react-native'; |
This file contains hidden or 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 page1 from './page1'; | |
import page2 from './page2'; | |
const Routes = ({ | |
Page1Screen: { | |
screen: page1, | |
navigationOptions: { | |
title: 'Page 1', | |
headerTintColor: "#ffffff", | |
headerStyle: { |
This file contains hidden or 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 './config/reactotron_config'; | |
import { | |
AppRegistry, | |
} from 'react-native'; | |
import AppNavigator from './modules/navigators/AppNavigator'; | |
export default class TripCase extends Component { | |
render() { | |
return ( |
This file contains hidden or 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 { Text, View } from 'react-native'; | |
import LogoutButton from './button'; | |
export default class Header extends Component { | |
render() { | |
return ( | |
<View style={{backgroundColor:"#fff", | |
width: 375, height: 100, flexDirection: "row", | |
alignItems: "center", justifyContent: "space-between"}}> |
This file contains hidden or 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 { Text, View } from 'react-native'; | |
import Header from './header'; | |
import { connect } from 'react-redux'; | |
class ParentComponent extends Component { | |
render() { | |
if (this.props.state.login) { | |
return ( | |
<View style={{backgroundColor:"#000", width: 500, |
This file contains hidden or 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
export const LOGOUT = 'LOGOUT' | |
// here the action creator is logoutOfApp | |
export function logoutOfApp(status) { | |
return { | |
type: LOGOUT, | |
status | |
}; | |
} |
This file contains hidden or 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
const initialState = { | |
login: true | |
}; | |
export default function reducer(state, action) { | |
if (typeof state === 'undefined') { | |
return initialState; | |
} | |
switch (action.type) { | |
case 'LOGOUT': |
NewerOlder