{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/4331","labels_url":"https://api.github.com/repos/facebook/react/issues/4331/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/4331/comments","events_url":"https://api.github.com/repos/facebook/react/issues/4331/events","html_url":"https://github.com/facebook/react/issues/4331","id":94170682,"number":4331,"title":"Why are attribute names \"class\" and \"for\" discouraged?","user":{"login":"callumlocke","id":250617,"avatar_url":"https://avatars.githubusercontent.com/u/250617?v=3","gravatar_id":"","url":"https://api.github.com/users/callumlocke","html_url":"https://github.com/callumlocke","followers_url":"https://api.github.com/users/callumlocke/followers","following_url":"https://api.github.com/users/callumlocke/following{/other_user}","gists_url":"https://api.github.com/users/callumlocke/gists{/gist_id}","starred_url":"https://api.github.com/users/callumlocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callumlocke/subscriptions","organizations_url":"https://api.github.com/users/callumlocke/orgs","repos_url":"https://api.github.com/users/callumlocke/repos","events_url":"https://api.github.com/users/callumlocke/events{/privacy}","received_events_url":"https://api.github.com/users/callumlocke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-09T22:55:18Z","updated_at":"2015-07-09T23:01:39Z","closed_at":null,"body":"From the [docs](https://facebook.github.io/react/docs/jsx-in-depth.html#html-tags-vs.-react-components):\r\n\r\n> **Note:**\r\n> Since JSX is JavaScript, identifiers such as `class` and `for` are discouraged as XML attribute names. Instead, React DOM components expect DOM property names like `className` and `htmlFor`, respectively.\r\n\r\nBut the JSX compiler seems to be [smart enough to quote keys like `\"class\"` and `\"for\"`](https://babeljs.io/repl/#?experimental=false&evaluate=false&loose=false&spec=false&code=var%20label%20%3D%20%3Clabel%20id%3D%22foo%22%20class%3D%22bar%22%20for%3D%22other%22%2F%3E%3B) (so they'll work fine even in pre-ES5 environments). So what's the problem? Why are they discouraged, and what exactly does that mean?"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/120170325","html_url":"https://github.com/facebook/react/issues/4331#issuecomment-120170325","issue_url":"https://api.github.com/repos/facebook/react/issues/4331","id":120170325,"user":{"login":"jimfb","id":9595985,"avatar_url":"https://avatars.githubusercontent.com/u/9595985?v=3","gravatar_id":"","url":"https://api.github.com/users/jimfb","html_url":"https://github.com/jimfb","followers_url":"https://api.github.com/users/jimfb/followers","following_url":"https://api.github.com/users/jimfb/following{/other_user}","gists_url":"https://api.github.com/users/jimfb/gists{/gist_id}","starred_url":"https://api.github.com/users/jimfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimfb/subscriptions","organizations_url":"https://api.github.com/users/jimfb/orgs","repos_url":"https://api.github.com/users/jimfb/repos","events_url":"https://api.github.com/users/jimfb/events{/privacy}","received_events_url":"https://api.github.com/users/jimfb/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T23:01:39Z","updated_at":"2015-07-09T23:01:39Z","body":"If the docs are confusing, we should leave the issue open to fix them."}}