{"action":"opened","issue":{"url":"https://api.github.com/repos/nareshbhatia/mobx-state-router/issues/42","repository_url":"https://api.github.com/repos/nareshbhatia/mobx-state-router","labels_url":"https://api.github.com/repos/nareshbhatia/mobx-state-router/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/nareshbhatia/mobx-state-router/issues/42/comments","events_url":"https://api.github.com/repos/nareshbhatia/mobx-state-router/issues/42/events","html_url":"https://github.com/nareshbhatia/mobx-state-router/issues/42","id":358972542,"node_id":"MDU6SXNzdWUzNTg5NzI1NDI=","number":42,"title":"Throw RouterState won't trigger onEnter","user":{"login":"rexpan","id":313189,"node_id":"MDQ6VXNlcjMxMzE4OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/313189?v=4","gravatar_id":"","url":"https://api.github.com/users/rexpan","html_url":"https://github.com/rexpan","followers_url":"https://api.github.com/users/rexpan/followers","following_url":"https://api.github.com/users/rexpan/following{/other_user}","gists_url":"https://api.github.com/users/rexpan/gists{/gist_id}","starred_url":"https://api.github.com/users/rexpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rexpan/subscriptions","organizations_url":"https://api.github.com/users/rexpan/orgs","repos_url":"https://api.github.com/users/rexpan/repos","events_url":"https://api.github.com/users/rexpan/events{/privacy}","received_events_url":"https://api.github.com/users/rexpan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-11T09:55:58Z","updated_at":"2018-09-11T09:55:58Z","closed_at":null,"author_association":"NONE","body":"```ts\r\nconst routes: Routes[] = [\r\n    { name:\"x\"    , pattern:\"/x/:id\",\r\n        onEnter: async (fromState, toState, routerStore) => {\r\n            // ...\r\n            throw (new RouterState('y', {id:\"0\"}));\r\n        }},\r\n    { name:\"y\"    , pattern:\"/y/:id\",\r\n        onEnter: async (fromState, toState, routerStore) => {\r\n            // won't be trigger if redirect from state x\r\n        }},\r\n]\r\n```\r\n\r\nWhen `onEnter` of state `x` `throw (new RouterState('y'))`,\r\nit redirect to state `y` but won't trigger `onEnter` of state `y`."}}
{"actor":{"display_login":"rexpan"}}