diff --git a/examples/ReduxExample/package.json b/examples/ReduxExample/package.json index 690555e6..76448098 100644 --- a/examples/ReduxExample/package.json +++ b/examples/ReduxExample/package.json @@ -26,7 +26,7 @@ "react": "16.2.0", "react-native": "^0.52.0", "react-navigation": "link:../..", - "react-navigation-redux-helpers": "^1.0.0", + "react-navigation-redux-helpers": "^1.0.3", "react-redux": "^5.0.6", "redux": "^3.7.2" }, diff --git a/examples/ReduxExample/src/navigators/AppNavigator.js b/examples/ReduxExample/src/navigators/AppNavigator.js index 94f0a814..0e40a50a 100644 --- a/examples/ReduxExample/src/navigators/AppNavigator.js +++ b/examples/ReduxExample/src/navigators/AppNavigator.js @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { addNavigationHelpers, StackNavigator } from 'react-navigation'; +import { initializeListeners } from 'react-navigation-redux-helpers'; import LoginScreen from '../components/LoginScreen'; import MainScreen from '../components/MainScreen'; @@ -20,6 +21,10 @@ class AppWithNavigationState extends React.Component { nav: PropTypes.object.isRequired, }; + componentDidMount() { + initializeListeners('root', this.props.nav); + } + render() { const { dispatch, nav } = this.props; return (