Last active
March 27, 2018 18:10
-
-
Save carlossaraiva/387744392fff667cb4072423ebe563b4 to your computer and use it in GitHub Desktop.
native-base
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 { Root } from "native-base" | |
import PropTypes from 'prop-types' | |
import { connect } from 'react-redux' | |
import { addNavigationHelpers } from 'react-navigation' | |
import RootNavigator from '@navigators/root-navigator' | |
class App extends Component { | |
static navigationOptions = { | |
header: null, | |
tabBarVisible: true | |
} | |
render() { | |
const { dispatch, navigation, addListener } = this.props | |
return ( | |
<Root> | |
<RootNavigator | |
navigation={addNavigationHelpers({ | |
dispatch, | |
state: navigation, | |
addListener | |
})} | |
/> | |
</Root> | |
) | |
} | |
} | |
App.propTypes = { | |
dispatch: PropTypes.func, | |
navigation: PropTypes.object, | |
addListener: PropTypes.func | |
} | |
const mapStateToProps = ({ navigation }) => ({ | |
navigation | |
}) | |
export default connect(mapStateToProps)(App) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment