Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Hanging on Actions.[key]/Actions.pop() #2831

Closed
iChaosren opened this issue Jan 25, 2018 · 1 comment
Closed

App Hanging on Actions.[key]/Actions.pop() #2831

iChaosren opened this issue Jan 25, 2018 · 1 comment

Comments

@iChaosren
Copy link

iChaosren commented Jan 25, 2018

Version

  • react-native-router-flux v4.0.0-beta.28
  • react-native v0.51
  • expo v24

Expected behaviour

I use Actions.pop() on the Lightbox Component.
Lightbox Scene Disappears.

Actual behaviour

Click on Below Component:

class MovieListRightHeader extends Component {
    render() {
        return (
            <TouchableOpacity onPress={() => {
                Actions.filterModal();
            }}>
                <Text>Filter</Text>
            </TouchableOpacity>
        );
    }
}

Following Router gets used:

const RouterComponent = () => {
    return (
        <Router navBar={NavBar} createReducer={reducerCreate} sceneStyle={{ backgroundColor: '#1d1d1d' }}>
            <Lightbox key="lightbox">
                <Stack key="root">
                    <Scene key="movieList" component={MovieList} title="Movies" left={<MovieListLeftHeader />} right={<MovieListRightHeader />} initial />           
                </Stack>
                <Scene key="error" component={Error} />
                <Scene key="filterModal" component={FilterModal} />
            </Lightbox>
        </Router>
    );
};

Scene Displays as expected.
Click on Close Button.
App hangs and eventually closes.

export default class FilterModal extends Component { 
  render() {
    return (
    <Button onPress={() => Actions.pop()} title="Test Test Test" />
    );
  }
}

Logs the moment I tap on the MovieListRightHeader button:

5:44:13 PM
ACTION: Object {
  "params": Object {
    "cardStyle": Object {
      "backgroundColor": "#1d1d1d",
    },
    "init": true,
    "navBar": [Function NavBar],
    "routeName": "filterModal",
  },
  "routeName": "filterModal",
  "type": "REACT_NATIVE_ROUTER_FLUX_PUSH",
}
5:44:13 PM
ACTION: Object {
  "routeName": "movieList",
  "type": "REACT_NATIVE_ROUTER_FLUX_BLUR",
}
5:44:13 PM
ACTION: Object {
  "params": Object {
    "cardStyle": Object {
      "backgroundColor": "#1d1d1d",
    },
    "init": true,
    "navBar": [Function NavBar],
    "routeName": "filterModal",
  },
  "routeName": "filterModal",
  "type": "REACT_NATIVE_ROUTER_FLUX_FOCUS",
}
NOTE: I've tried simply navigating instead to any page, even one I just created and it hangs.
@iChaosren iChaosren changed the title Lightbox - Actions.pop not working App Hanging on Actions.[key]/Actions.pop() Jan 25, 2018
@iChaosren
Copy link
Author

Turns out, using the createReducer function can cause some... Issues...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant