{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/4038","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/4038/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/4038/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/4038/events","html_url":"https://github.com/ant-design/ant-design/issues/4038","id":192057014,"number":4038,"title":"Note on classNames; no need for computed prop","user":{"login":"STRML","id":1197375,"avatar_url":"https://avatars2.githubusercontent.com/u/1197375?v=4","gravatar_id":"","url":"https://api.github.com/users/STRML","html_url":"https://github.com/STRML","followers_url":"https://api.github.com/users/STRML/followers","following_url":"https://api.github.com/users/STRML/following{/other_user}","gists_url":"https://api.github.com/users/STRML/gists{/gist_id}","starred_url":"https://api.github.com/users/STRML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STRML/subscriptions","organizations_url":"https://api.github.com/users/STRML/orgs","repos_url":"https://api.github.com/users/STRML/repos","events_url":"https://api.github.com/users/STRML/events{/privacy}","received_events_url":"https://api.github.com/users/STRML/received_events","type":"User","site_admin":false},"labels":[{"id":459763377,"url":"https://api.github.com/repos/ant-design/ant-design/labels/help%20wanted","name":"help wanted","color":"0e8a16","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-28T16:50:10Z","updated_at":"2018-05-03T04:34:17Z","closed_at":"2016-11-30T02:20:23Z","author_association":"NONE","body":"[This code](https://github.com/ant-design/ant-design/blob/72fad02024b13067fced75c22e60d23df5537927/components/anchor/index.tsx#L118) ([another example](https://github.com/ant-design/ant-design/blob/08e21e0a2f734069faea4857329c64ca4b42287a/components/switch/index.tsx#L33)):\r\n\r\n```jsx\r\nconst classes = classNames({\r\n  [className]: !!className,\r\n  [`${prefixCls}-small`]: size === 'small',\r\n});\r\n```\r\n\r\nCan be simplified to:\r\n\r\n```jsx\r\nconst classes = classNames(className, {\r\n  [`${prefixCls}-small`]: size === 'small',\r\n});\r\n```\r\n\r\n[Runnable Example](https://runkit.com/582b986d443e280014695763/583c5f6bfb94e60014cd2b44)."},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/386189219","html_url":"https://github.com/ant-design/ant-design/issues/4038#issuecomment-386189219","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/4038","id":386189219,"user":{"login":"lock[bot]","id":33595554,"avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-05-03T04:34:17Z","updated_at":"2018-05-03T04:34:17Z","author_association":"NONE","body":"This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.\n"}}
{"actor":{"display_login":"lock"}}