{"action":"closed","issue":{"url":"https://api.github.com/repos/gajus/react-css-modules/issues/185","repository_url":"https://api.github.com/repos/gajus/react-css-modules","labels_url":"https://api.github.com/repos/gajus/react-css-modules/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/gajus/react-css-modules/issues/185/comments","events_url":"https://api.github.com/repos/gajus/react-css-modules/issues/185/events","html_url":"https://github.com/gajus/react-css-modules/issues/185","id":183122934,"number":185,"title":"other implementation of react-css-module","user":{"login":"craigcosmo","id":538657,"avatar_url":"https://avatars.githubusercontent.com/u/538657?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcosmo","html_url":"https://github.com/craigcosmo","followers_url":"https://api.github.com/users/craigcosmo/followers","following_url":"https://api.github.com/users/craigcosmo/following{/other_user}","gists_url":"https://api.github.com/users/craigcosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcosmo/subscriptions","organizations_url":"https://api.github.com/users/craigcosmo/orgs","repos_url":"https://api.github.com/users/craigcosmo/repos","events_url":"https://api.github.com/users/craigcosmo/events{/privacy}","received_events_url":"https://api.github.com/users/craigcosmo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gajus/react-css-modules/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T18:43:59Z","updated_at":"2016-10-17T11:56:36Z","closed_at":"2016-10-17T11:56:36Z","body":"What I see about this is, it replaces the name of CSS class in .jsx and .css or .scss file with a hash string. If it's that's all it does why don't we just do like this.\r\n\r\nOur base code before any transpiling is like this\r\n\r\nhome.scss\r\n```scss\r\n.home {\r\n    width:500px;\r\n}\r\n.box {\r\n   width:200px;\r\n}\r\n```\r\n\r\nHome.jsx component\r\n\r\n```jsx\r\nrender(){\r\n   <div className=\"home\">\r\n       <div className=\"box\"></div>\r\n   <div>\r\n}\r\n```\r\n\r\nNow react-css-module will make that become this\r\n\r\nhome.scss\r\n\r\n```scss\r\n.home_1fg8e {\r\n    width:500px;\r\n}\r\n.box_78uuy {\r\n   width:200px;\r\n}\r\n```\r\n\r\n\r\n```jsx\r\nrender(){\r\n   <div className=\"home_1fg8e\">\r\n       <div className=\"box_78uuy\"></div>\r\n   <div>\r\n}\r\n```\r\n\r\nIsn't that more natural? Instead of assigning js object as className?\r\n\r\nHas my suggestion been thought before but due to drawback it was put off? Or it hasn't been done because of the technical?\r\n\r\n"}}
{"actor":{"display_login":"gajus"}}