{"action":"created","issue":{"url":"https://api.github.com/repos/react-community/react-navigation/issues/1313","repository_url":"https://api.github.com/repos/react-community/react-navigation","labels_url":"https://api.github.com/repos/react-community/react-navigation/issues/1313/labels{/name}","comments_url":"https://api.github.com/repos/react-community/react-navigation/issues/1313/comments","events_url":"https://api.github.com/repos/react-community/react-navigation/issues/1313/events","html_url":"https://github.com/react-community/react-navigation/pull/1313","id":225323539,"number":1313,"title":"Make sure dispatch can be called multiple times per-tick","user":{"login":"dantman","id":53399,"avatar_url":"https://avatars2.githubusercontent.com/u/53399?v=4","gravatar_id":"","url":"https://api.github.com/users/dantman","html_url":"https://github.com/dantman","followers_url":"https://api.github.com/users/dantman/followers","following_url":"https://api.github.com/users/dantman/following{/other_user}","gists_url":"https://api.github.com/users/dantman/gists{/gist_id}","starred_url":"https://api.github.com/users/dantman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantman/subscriptions","organizations_url":"https://api.github.com/users/dantman/orgs","repos_url":"https://api.github.com/users/dantman/repos","events_url":"https://api.github.com/users/dantman/events{/privacy}","received_events_url":"https://api.github.com/users/dantman/received_events","type":"User","site_admin":false},"labels":[{"id":598136973,"url":"https://api.github.com/repos/react-community/react-navigation/labels/PR:%20needs%20review","name":"PR: needs review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2017-04-30T12:18:31Z","updated_at":"2017-11-04T10:00:06Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/react-community/react-navigation/pulls/1313","html_url":"https://github.com/react-community/react-navigation/pull/1313","diff_url":"https://github.com/react-community/react-navigation/pull/1313.diff","patch_url":"https://github.com/react-community/react-navigation/pull/1313.patch"},"body":"Mostly fixes #1206\r\n\r\n## Test plan (required)\r\n\r\nI've added tests:\r\n* To validate the dispatch => true/false return value behaviour is retained\r\n* `dispatch` functions normally, updating the state by the next tick\r\n* The change to `dispatch` works, allowing 2 calls to dispatch to work in the same tick without throwing away data\r\n  * react-test-runner applies setState synchronously instad of waiting for the next tick like React normally does so the test file makes sure to inject a batching strategy that applies setState when `jest.runOnlyPendingTimers();` is called\r\n  * The test also verifies that state has **not** been updated synchronously immediately after the dispatch call to ensure that  jest committing setState synchronously does not result in a falsely passing test"},"comment":{"url":"https://api.github.com/repos/react-community/react-navigation/issues/comments/341885122","html_url":"https://github.com/react-community/react-navigation/pull/1313#issuecomment-341885122","issue_url":"https://api.github.com/repos/react-community/react-navigation/issues/1313","id":341885122,"user":{"login":"kelset","id":16104054,"avatar_url":"https://avatars3.githubusercontent.com/u/16104054?v=4","gravatar_id":"","url":"https://api.github.com/users/kelset","html_url":"https://github.com/kelset","followers_url":"https://api.github.com/users/kelset/followers","following_url":"https://api.github.com/users/kelset/following{/other_user}","gists_url":"https://api.github.com/users/kelset/gists{/gist_id}","starred_url":"https://api.github.com/users/kelset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelset/subscriptions","organizations_url":"https://api.github.com/users/kelset/orgs","repos_url":"https://api.github.com/users/kelset/repos","events_url":"https://api.github.com/users/kelset/events{/privacy}","received_events_url":"https://api.github.com/users/kelset/received_events","type":"User","site_admin":false},"created_at":"2017-11-04T10:00:06Z","updated_at":"2017-11-04T10:00:06Z","author_association":"COLLABORATOR","body":"Hey @dantman we finally upgraded to 0.49 & flow 0.53 so I think this PR can be unlocked now, right?"}}
{"actor":{"display_login":"kelset"}}