{"action":"created","issue":{"url":"https://api.github.com/repos/orta/react-storybooks-relay-container/issues/1","repository_url":"https://api.github.com/repos/orta/react-storybooks-relay-container","labels_url":"https://api.github.com/repos/orta/react-storybooks-relay-container/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/orta/react-storybooks-relay-container/issues/1/comments","events_url":"https://api.github.com/repos/orta/react-storybooks-relay-container/issues/1/events","html_url":"https://github.com/orta/react-storybooks-relay-container/pull/1","id":194974147,"number":1,"title":"Add abort() stub for context methods","user":{"login":"acruis","id":8437638,"avatar_url":"https://avatars.githubusercontent.com/u/8437638?v=3","gravatar_id":"","url":"https://api.github.com/users/acruis","html_url":"https://github.com/acruis","followers_url":"https://api.github.com/users/acruis/followers","following_url":"https://api.github.com/users/acruis/following{/other_user}","gists_url":"https://api.github.com/users/acruis/gists{/gist_id}","starred_url":"https://api.github.com/users/acruis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acruis/subscriptions","organizations_url":"https://api.github.com/users/acruis/orgs","repos_url":"https://api.github.com/users/acruis/repos","events_url":"https://api.github.com/users/acruis/events{/privacy}","received_events_url":"https://api.github.com/users/acruis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-12T13:27:57Z","updated_at":"2016-12-12T15:00:39Z","closed_at":"2016-12-12T14:59:45Z","pull_request":{"url":"https://api.github.com/repos/orta/react-storybooks-relay-container/pulls/1","html_url":"https://github.com/orta/react-storybooks-relay-container/pull/1","diff_url":"https://github.com/orta/react-storybooks-relay-container/pull/1.diff","patch_url":"https://github.com/orta/react-storybooks-relay-container/pull/1.patch"},"body":"I have a component that does `this.props.relay.setVariables` as part of its `componentDidMount`, and some other components that do the same when there is user interaction.\r\n\r\nThe stubbing of `primeCache` in `StubbedRelayContainer` handles the call well, but when we call `setVariables`, Relay also [saves](https://github.com/facebook/relay/blob/7110c68f437391ad1ee54ab2c84fd8896a8662fb/src/container/RelayContainer.js#L357) the return value of `primeCache` as a property `pending`. When the component gets unmounted (for example when we view a different story), it [calls](https://github.com/facebook/relay/blob/7110c68f437391ad1ee54ab2c84fd8896a8662fb/src/container/RelayContainer.js#L544) `pending.request.abort()`, which causes an error as `pending.request.abort` is undefined.\r\n\r\nThis is probably not that big of a problem for web-based React apps, but it does cause React Native apps to get a red box error, which is pretty annoying when browsing through storybook stories."},"comment":{"url":"https://api.github.com/repos/orta/react-storybooks-relay-container/issues/comments/266452481","html_url":"https://github.com/orta/react-storybooks-relay-container/pull/1#issuecomment-266452481","issue_url":"https://api.github.com/repos/orta/react-storybooks-relay-container/issues/1","id":266452481,"user":{"login":"orta","id":49038,"avatar_url":"https://avatars.githubusercontent.com/u/49038?v=3","gravatar_id":"","url":"https://api.github.com/users/orta","html_url":"https://github.com/orta","followers_url":"https://api.github.com/users/orta/followers","following_url":"https://api.github.com/users/orta/following{/other_user}","gists_url":"https://api.github.com/users/orta/gists{/gist_id}","starred_url":"https://api.github.com/users/orta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orta/subscriptions","organizations_url":"https://api.github.com/users/orta/orgs","repos_url":"https://api.github.com/users/orta/repos","events_url":"https://api.github.com/users/orta/events{/privacy}","received_events_url":"https://api.github.com/users/orta/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T15:00:39Z","updated_at":"2016-12-12T15:00:39Z","body":"deployed as 1.0.1"}}
{"actor":{"display_login":"orta"}}