{"action":"created","issue":{"url":"https://api.github.com/repos/allain/observable-react-state/issues/1","repository_url":"https://api.github.com/repos/allain/observable-react-state","labels_url":"https://api.github.com/repos/allain/observable-react-state/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/allain/observable-react-state/issues/1/comments","events_url":"https://api.github.com/repos/allain/observable-react-state/issues/1/events","html_url":"https://github.com/allain/observable-react-state/issues/1","id":303895767,"number":1,"title":"Add `.complete` and `.error` methods, and add `onComplete` listeners.","user":{"login":"RangerMauve","id":911495,"avatar_url":"https://avatars3.githubusercontent.com/u/911495?v=4","gravatar_id":"","url":"https://api.github.com/users/RangerMauve","html_url":"https://github.com/RangerMauve","followers_url":"https://api.github.com/users/RangerMauve/followers","following_url":"https://api.github.com/users/RangerMauve/following{/other_user}","gists_url":"https://api.github.com/users/RangerMauve/gists{/gist_id}","starred_url":"https://api.github.com/users/RangerMauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RangerMauve/subscriptions","organizations_url":"https://api.github.com/users/RangerMauve/orgs","repos_url":"https://api.github.com/users/RangerMauve/repos","events_url":"https://api.github.com/users/RangerMauve/events{/privacy}","received_events_url":"https://api.github.com/users/RangerMauve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-09T16:19:37Z","updated_at":"2018-03-09T23:29:02Z","closed_at":null,"author_association":"NONE","body":"Dream API:\r\n\r\n```javascript\r\n\r\nclass WebsocketConnection extends ObservableReactState {\r\n\tstate = {\r\n\t\tws: null\r\n\t}\r\n\tconstructor(url) {\r\n\t\tthis.setState({\r\n\t\t\tws: new Websocket(url)\r\n\t\t});\r\n\t}\r\n\tonComplete() {\r\n\t\tthis.state.ws.close()\r\n\t}\r\n}\r\n\r\nvar connection = new WebsocketConnection(\"example.com\");\r\n\r\n// Some time later\r\n\r\nconnection.complete();\r\n```"},"comment":{"url":"https://api.github.com/repos/allain/observable-react-state/issues/comments/371974626","html_url":"https://github.com/allain/observable-react-state/issues/1#issuecomment-371974626","issue_url":"https://api.github.com/repos/allain/observable-react-state/issues/1","id":371974626,"user":{"login":"allain","id":112751,"avatar_url":"https://avatars2.githubusercontent.com/u/112751?v=4","gravatar_id":"","url":"https://api.github.com/users/allain","html_url":"https://github.com/allain","followers_url":"https://api.github.com/users/allain/followers","following_url":"https://api.github.com/users/allain/following{/other_user}","gists_url":"https://api.github.com/users/allain/gists{/gist_id}","starred_url":"https://api.github.com/users/allain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allain/subscriptions","organizations_url":"https://api.github.com/users/allain/orgs","repos_url":"https://api.github.com/users/allain/repos","events_url":"https://api.github.com/users/allain/events{/privacy}","received_events_url":"https://api.github.com/users/allain/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T23:29:02Z","updated_at":"2018-03-09T23:29:02Z","author_association":"OWNER","body":"Can you explain what the problem you're trying to solve with this might be?"}}
{"actor":{"display_login":"allain"}}