{"action":"created","issue":{"url":"https://api.github.com/repos/emotion-js/emotion/issues/837","repository_url":"https://api.github.com/repos/emotion-js/emotion","labels_url":"https://api.github.com/repos/emotion-js/emotion/issues/837/labels{/name}","comments_url":"https://api.github.com/repos/emotion-js/emotion/issues/837/comments","events_url":"https://api.github.com/repos/emotion-js/emotion/issues/837/events","html_url":"https://github.com/emotion-js/emotion/issues/837","id":357169378,"node_id":"MDU6SXNzdWUzNTcxNjkzNzg=","number":837,"title":"`as` prop","user":{"login":"Andarist","id":9800850,"node_id":"MDQ6VXNlcjk4MDA4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/9800850?v=4","gravatar_id":"","url":"https://api.github.com/users/Andarist","html_url":"https://github.com/Andarist","followers_url":"https://api.github.com/users/Andarist/followers","following_url":"https://api.github.com/users/Andarist/following{/other_user}","gists_url":"https://api.github.com/users/Andarist/gists{/gist_id}","starred_url":"https://api.github.com/users/Andarist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andarist/subscriptions","organizations_url":"https://api.github.com/users/Andarist/orgs","repos_url":"https://api.github.com/users/Andarist/repos","events_url":"https://api.github.com/users/Andarist/events{/privacy}","received_events_url":"https://api.github.com/users/Andarist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-05T10:40:42Z","updated_at":"2018-09-05T23:09:58Z","closed_at":null,"author_association":"MEMBER","body":"Styled-components v4 has introduced this, which seems like a useful thing to me.\r\n\r\nIt is neat to specify the underlaying component dynamically instead of creating all variants upfront. The feature was also introduced previously in completely separate project - https://github.com/reakit/reakit (built in on top of styled-components v3). Not sure if they have consulted/discussed it, but seems like it has proven to be useful as it got implemented in the core API."},"comment":{"url":"https://api.github.com/repos/emotion-js/emotion/issues/comments/418910374","html_url":"https://github.com/emotion-js/emotion/issues/837#issuecomment-418910374","issue_url":"https://api.github.com/repos/emotion-js/emotion/issues/837","id":418910374,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODkxMDM3NA==","user":{"login":"tkh44","id":662750,"node_id":"MDQ6VXNlcjY2Mjc1MA==","avatar_url":"https://avatars2.githubusercontent.com/u/662750?v=4","gravatar_id":"","url":"https://api.github.com/users/tkh44","html_url":"https://github.com/tkh44","followers_url":"https://api.github.com/users/tkh44/followers","following_url":"https://api.github.com/users/tkh44/following{/other_user}","gists_url":"https://api.github.com/users/tkh44/gists{/gist_id}","starred_url":"https://api.github.com/users/tkh44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkh44/subscriptions","organizations_url":"https://api.github.com/users/tkh44/orgs","repos_url":"https://api.github.com/users/tkh44/repos","events_url":"https://api.github.com/users/tkh44/events{/privacy}","received_events_url":"https://api.github.com/users/tkh44/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T23:09:58Z","updated_at":"2018-09-05T23:09:58Z","author_association":"MEMBER","body":"> The only open question for us is how should we handle shouldForwardProp in combination with as.\r\n\r\nI'm wondering this as well.\r\n\r\n@alexkrautmann creating a styled component on every render is ill-advised. It would be much simpler to use `css` to create a className and return the element.\r\n\r\ne.g.\r\n\r\n```\r\nexport const Heading: SFC<HeadingProps> = ({ children = null, tag = HeadingTags.h1 }) => {\r\n    const myClassName = css(headingCss);\r\n    return React.createElement(tag, { className: myClassName, children })\r\n};\r\n```"}}
{"actor":{"display_login":"tkh44"}}