{"action":"created","issue":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1004","repository_url":"https://api.github.com/repos/aksonov/react-native-router-flux","labels_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1004/labels{/name}","comments_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1004/comments","events_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1004/events","html_url":"https://github.com/aksonov/react-native-router-flux/issues/1004","id":168947293,"number":1004,"title":"REACT_NATIVE_ROUTER_FLUX_FOCUS is invoked at the beginning of scene transition ","user":{"login":"alsh76","id":8568628,"avatar_url":"https://avatars.githubusercontent.com/u/8568628?v=3","gravatar_id":"","url":"https://api.github.com/users/alsh76","html_url":"https://github.com/alsh76","followers_url":"https://api.github.com/users/alsh76/followers","following_url":"https://api.github.com/users/alsh76/following{/other_user}","gists_url":"https://api.github.com/users/alsh76/gists{/gist_id}","starred_url":"https://api.github.com/users/alsh76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alsh76/subscriptions","organizations_url":"https://api.github.com/users/alsh76/orgs","repos_url":"https://api.github.com/users/alsh76/repos","events_url":"https://api.github.com/users/alsh76/events{/privacy}","received_events_url":"https://api.github.com/users/alsh76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-02T17:52:24Z","updated_at":"2016-08-03T17:31:25Z","closed_at":null,"body":"### Version\r\nTell us which versions you are using: \r\n\r\n- react-native-router-flux v3.32.0\r\n- react-native v0.30.0\r\n\r\n### Expected behaviour\r\n\r\nREACT_NATIVE_ROUTER_FLUX_FOCUS should be invoked at the end of transition between scenes or we need to have other way to detect end of transition\r\n\r\n### Actual behaviour\r\n\r\nIt's not possible to detect end of transition between scenes (excluding setTimeout).\r\nREACT_NATIVE_ROUTER_FLUX_FOCUS is invoked at the beginning of transitions, immediately after dispatching REACT_NATIVE_ROUTER_FLUX_PUSH and REACT_NATIVE_ROUTER_FLUX_BACK_ACTION\r\n\r\n\r\n### Steps to reproduce\r\n\r\nVideo [Possible navigation issues in React Native/Redux app ](https://youtu.be/VM7OW3uqR7k)\r\n\r\n```\r\n    reducerCreate(params){\r\n        const defaultReducer = Reducer(params);\r\n        return (state, action)=>{\r\n            switch (action.type) {\r\n                case ActionConst.PUSH:\r\n                    console.log(ActionConst.PUSH, action.key);\r\n                    break;\r\n                case ActionConst.FOCUS:\r\n                    console.log(ActionConst.FOCUS, action.scene.sceneKey);\r\n                    break;\r\n                default:\r\n                    console.log(action.type);\r\n            }\r\n            return defaultReducer(state, action);\r\n        }\r\n    }\r\n  \r\n    render() {\r\n        const ReduxRouter = connect()(Router);\r\n        const store = createStoreWithMiddleware(reducer);\r\n        return (\r\n        <Provider store={store}>\r\n            <ReduxRouter createReducer={this.reducerCreate} >\r\n        \t    <Scene key=\"root\" >\r\n                <Scene key=\"Start\" \r\n                                duration={2000}\r\n                                initial={true}\r\n                                 component={Start}\r\n                                 title=\"Start\"\r\n                                 />\r\n                             \r\n                <Scene key=\"Test\" \r\n                                 duration={2000}\r\n                                 component={Test}\r\n                                 title=\"Test\"\r\n                                 />\r\n                </Scene>\r\n            </ReduxRouter>\r\n        </Provider>\r\n        )\r\n    }\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/comments/237308107","html_url":"https://github.com/aksonov/react-native-router-flux/issues/1004#issuecomment-237308107","issue_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/1004","id":237308107,"user":{"login":"Dean177","id":4590254,"avatar_url":"https://avatars.githubusercontent.com/u/4590254?v=3","gravatar_id":"","url":"https://api.github.com/users/Dean177","html_url":"https://github.com/Dean177","followers_url":"https://api.github.com/users/Dean177/followers","following_url":"https://api.github.com/users/Dean177/following{/other_user}","gists_url":"https://api.github.com/users/Dean177/gists{/gist_id}","starred_url":"https://api.github.com/users/Dean177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dean177/subscriptions","organizations_url":"https://api.github.com/users/Dean177/orgs","repos_url":"https://api.github.com/users/Dean177/repos","events_url":"https://api.github.com/users/Dean177/events{/privacy}","received_events_url":"https://api.github.com/users/Dean177/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T17:31:25Z","updated_at":"2016-08-03T17:31:25Z","body":"There is a section in the react native docs which should help you:\r\nhttps://facebook.github.io/react-native/docs/performance.html#slow-navigator-transitions"}}
{"actor":{"display_login":"Dean177"}}