{"action":"opened","issue":{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/372","labels_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/372/comments","events_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/372/events","html_url":"https://github.com/kriasoft/react-starter-kit/issues/372","id":124033343,"number":372,"title":"@withViewport() produce problem TypeError: Cannot call a class as a function ","user":{"login":"nodkz","id":1946920,"avatar_url":"https://avatars.githubusercontent.com/u/1946920?v=3","gravatar_id":"","url":"https://api.github.com/users/nodkz","html_url":"https://github.com/nodkz","followers_url":"https://api.github.com/users/nodkz/followers","following_url":"https://api.github.com/users/nodkz/following{/other_user}","gists_url":"https://api.github.com/users/nodkz/gists{/gist_id}","starred_url":"https://api.github.com/users/nodkz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodkz/subscriptions","organizations_url":"https://api.github.com/users/nodkz/orgs","repos_url":"https://api.github.com/users/nodkz/repos","events_url":"https://api.github.com/users/nodkz/events{/privacy}","received_events_url":"https://api.github.com/users/nodkz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-28T08:18:37Z","updated_at":"2015-12-28T08:18:37Z","closed_at":null,"body":"Be aware with decorator `@withViewport`: it must be used without parentheses ()\r\n\r\nOtherwise on child components it produce unclear error:\r\n```\r\nexport default Header;\r\n                     ^\r\nTypeError: Cannot call a class as a function\r\n```\r\n\r\nOn this kind of code:\r\n```javascript \r\n@withViewport   <--- MUST BE without ()\r\n@withStyles(s)\r\nclass Page extends React.Component {\r\n  render() {\r\n     return (\r\n       <div>\r\n          <Header ... />\r\n       </div>\r\n     );\r\n  }\r\n}\r\n```"}}