Skip to content

Instantly share code, notes, and snippets.

@dabit3
Created June 17, 2016 14:57
Show Gist options
  • Save dabit3/2c0f3ac610b9afb98e91039ddd449fe1 to your computer and use it in GitHub Desktop.
Save dabit3/2c0f3ac610b9afb98e91039ddd449fe1 to your computer and use it in GitHub Desktop.
React Native Navigator Experimental Part 2 — Implementing Redux navRootContainer.js
import { connect } from 'react-redux'
import NavigationRoot from '../components/NavRoot'
import { push, pop } from '../actions/navActions'
function mapStateToProps (state) {
return {
navigation: state.navReducer
}
}
export default connect(
mapStateToProps,
{
pushRoute: (route) => push(route),
popRoute: () => pop()
}
)(NavigationRoot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment