Is this a bug report?
No
Yes
Environment
react-native -v:
react-native-cli: 2.0.1
react-native:0.47.2
node -v: v8.2.1
npm -v: 4.6.1
yarn --version:
Then, specify:
- Development Operating System: windows 7 ultimate version 6.1
Code:
import React, {Component} from 'react'
import {Provider, connect} from 'react-native'
import {StackNavigator, addNavigationHelpers} from 'react-navigation'
import Routes from './config/routes'
import getStore from './store'
const Navigator = StackNavigator(Routes, {
headerMode: 'none'
})
const navReducer = (state, action) => {
const newState = Navigator.router.getStateForAction(action, state)
return newState || state
}
class App extends Component {
render(){
return(
<Navigator
navigation={addNavigationHelpers({
dispatch: this.props.dispatch,
state: this.props.nav
})}
/>
)
}
}
const store = getStore(navReducer)
const AppIndex = connect( state => ({ nav: state.nav }) )(App)
export default Index = () => {
return (
<Provider store={store}>
<AppIndex />
</Provider>
)
}
Is this a bug report?
No
Have you read the Contributing Guidelines?
Yes
Environment
react-native -v:react-native-cli: 2.0.1
react-native:0.47.2
node -v: v8.2.1npm -v: 4.6.1yarn --version:Then, specify:
Code:
import React, {Component} from 'react'import {Provider, connect} from 'react-native'import {StackNavigator, addNavigationHelpers} from 'react-navigation'import Routes from './config/routes'import getStore from './store'const Navigator = StackNavigator(Routes, {headerMode: 'none'})const navReducer = (state, action) => {const newState = Navigator.router.getStateForAction(action, state)return newState || state}class App extends Component {render(){return(<Navigatornavigation={addNavigationHelpers({dispatch: this.props.dispatch,state: this.props.nav})}/>)}}const store = getStore(navReducer)const AppIndex = connect( state => ({ nav: state.nav }) )(App)export default Index = () => {return (<Provider store={store}><AppIndex /></Provider>)}