react-navigation / redux-helpers

Redux middleware and utils for React Navigation
Other
296 stars 43 forks source link

addListener dont work #51

Closed ahce closed 6 years ago

ahce commented 6 years ago

Perfect works in react-navigation 2.2.5 and react-navigation-redux-helpers 1.1.2 Dont works in react-navigation 2.7.0 and react-navigation-redux-helpers 2.0.2 The events focus and blur, only work in first screen,

psyanite commented 6 years ago

This is also happening to me... I am dying... Please help.

    "react-navigation": "~2.3.1",
    "react-navigation-redux-helpers": "^2.0.2",
    "react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz"

I am using createSwitchNavigator with a createBottomTabNavigator, switching between my tabs is not firing any events. All events willFocus, didFocus,, willBlur, didBlur are not firing.

componentDidMount() {
    this.props.navigation.addListener('willFocus', () => {
      Alert.alert('SettingsScreen#willFocus');
    });
}
Ashoat commented 6 years ago

If either of you can create an Expo Snack that reproduces the issue I’ll take a look.

Ashoat commented 6 years ago

Let's follow-up on #53