{"action":"created","issue":{"url":"https://api.github.com/repos/vigetlabs/microcosm/issues/192","repository_url":"https://api.github.com/repos/vigetlabs/microcosm","labels_url":"https://api.github.com/repos/vigetlabs/microcosm/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/vigetlabs/microcosm/issues/192/comments","events_url":"https://api.github.com/repos/vigetlabs/microcosm/issues/192/events","html_url":"https://github.com/vigetlabs/microcosm/pull/192","id":193504588,"number":192,"title":"Warn when withIntent is called as function","user":{"login":"nhunzaker","id":590904,"avatar_url":"https://avatars.githubusercontent.com/u/590904?v=3","gravatar_id":"","url":"https://api.github.com/users/nhunzaker","html_url":"https://github.com/nhunzaker","followers_url":"https://api.github.com/users/nhunzaker/followers","following_url":"https://api.github.com/users/nhunzaker/following{/other_user}","gists_url":"https://api.github.com/users/nhunzaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nhunzaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhunzaker/subscriptions","organizations_url":"https://api.github.com/users/nhunzaker/orgs","repos_url":"https://api.github.com/users/nhunzaker/repos","events_url":"https://api.github.com/users/nhunzaker/events{/privacy}","received_events_url":"https://api.github.com/users/nhunzaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-05T14:03:24Z","updated_at":"2016-12-05T17:16:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vigetlabs/microcosm/pulls/192","html_url":"https://github.com/vigetlabs/microcosm/pull/192","diff_url":"https://github.com/vigetlabs/microcosm/pull/192.diff","patch_url":"https://github.com/vigetlabs/microcosm/pull/192.patch"},"body":"I just hit an issue where calling `withIntent` returns a stateless (function) component and the Presenter thought it was a plain old `view()` method. That meant that `withIntent` never received proper context 😢.\r\n\r\n## Changes\r\n\r\n**withIntent displays a few nice warnings now:**\r\n\r\n<img width=\"808\" alt=\"screen shot 2016-12-05 at 8 59 40 am\" src=\"https://cloud.githubusercontent.com/assets/590904/20887630/781f1e38-bac9-11e6-8fca-807805406376.png\">\r\n\r\n**Presenters always call `React.createElement` on their view**.\r\n\r\nThis means that the new signature for a view method is:\r\n\r\n```javascript\r\nview (model, context) {\r\n  return <Component />\r\n}\r\n```\r\n\r\nGenerally, I would like to move away from using `view` as a method and always assign it as an inline property or getter. Having a `view` method that returns JSX has been a source of confusion when I solicit feedback about the abstraction.\r\n\r\n---\r\n\r\n## Questions\r\n\r\n1. Should we raise an exception instead of gracefully failing? \r\n2. Is the Presenter tweak (calling `createElement`) a breaking change? \r\n"},"comment":{"url":"https://api.github.com/repos/vigetlabs/microcosm/issues/comments/264915381","html_url":"https://github.com/vigetlabs/microcosm/pull/192#issuecomment-264915381","issue_url":"https://api.github.com/repos/vigetlabs/microcosm/issues/192","id":264915381,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T17:16:31Z","updated_at":"2016-12-05T17:16:31Z","body":"\n[![Coverage Status](https://coveralls.io/builds/9134149/badge)](https://coveralls.io/builds/9134149)\n\nCoverage remained the same at 100.0% when pulling **a31ef2596a3fef60a01d5df189a41d854a61a035 on with-intent-warnings** into **92af2e62dbbddd9bbd726ea7a2c9197ad1f90be5 on master**.\n"}}
{"actor":{"display_login":"coveralls"}}