{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/7885","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/7885/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/7885/comments","events_url":"https://api.github.com/repos/facebook/react/issues/7885/events","html_url":"https://github.com/facebook/react/issues/7885","id":181234953,"number":7885,"title":"Thinking in React Tutorial Update","user":{"login":"hnordt","id":1625399,"avatar_url":"https://avatars.githubusercontent.com/u/1625399?v=3","gravatar_id":"","url":"https://api.github.com/users/hnordt","html_url":"https://github.com/hnordt","followers_url":"https://api.github.com/users/hnordt/followers","following_url":"https://api.github.com/users/hnordt/following{/other_user}","gists_url":"https://api.github.com/users/hnordt/gists{/gist_id}","starred_url":"https://api.github.com/users/hnordt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnordt/subscriptions","organizations_url":"https://api.github.com/users/hnordt/orgs","repos_url":"https://api.github.com/users/hnordt/repos","events_url":"https://api.github.com/users/hnordt/events{/privacy}","received_events_url":"https://api.github.com/users/hnordt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T18:47:12Z","updated_at":"2016-10-05T23:12:38Z","closed_at":null,"body":"[Thinking in React](https://facebook.github.io/react/docs/thinking-in-react.html) is one of the most important and well written tutorials for beginners and even for advanced developers.\r\n\r\nI would like to update it to ES6 and increase the readability.\r\n\r\nAlso I would like to replace JSFiddle with the React docs highlighter.\r\n\r\nFirst suggestions:\r\n\r\n```jsx\r\n// Replace\r\n\r\nvar ProductCategoryRow = React.createClass({\r\n  render: function() {\r\n    return (<tr><th colSpan=\"2\">{this.props.category}</th></tr>);\r\n  }\r\n});\r\n\r\n// With\r\n\r\nfunction ProductCategoryRow({ category }) {\r\n  return (\r\n    <tr>\r\n      <th colSpan=\"2\">{category}</th>\r\n    </tr>\r\n  );\r\n}\r\n```\r\n\r\n```jsx\r\n// Replace\r\n\r\nvar ProductRow = React.createClass({\r\n  render: function() {\r\n    var name = this.props.product.stocked ?\r\n      this.props.product.name :\r\n      <span style={{color: 'red'}}>\r\n        {this.props.product.name}\r\n      </span>;\r\n    return (\r\n      <tr>\r\n        <td>{name}</td>\r\n        <td>{this.props.product.price}</td>\r\n      </tr>\r\n    );\r\n  }\r\n});\r\n\r\n// With\r\n\r\nfunction ProductName({ product }) {\r\n  return (\r\n    <span style={{ color: product.stocked ? 'green' : 'red' }}>\r\n      {product.name}\r\n    </span>\r\n  );\r\n}\r\n\r\nfunction ProductRow({ product }) {\r\n  return (\r\n    <tr>\r\n      <td>\r\n        <ProductName product={product} />\r\n      </td>\r\n      <td>{product.price}</td>\r\n    </tr>\r\n  );\r\n}\r\n```\r\n\r\nShould I continue or it doesn't worth the effort?"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/251826062","html_url":"https://github.com/facebook/react/issues/7885#issuecomment-251826062","issue_url":"https://api.github.com/repos/facebook/react/issues/7885","id":251826062,"user":{"login":"lacker","id":106475,"avatar_url":"https://avatars.githubusercontent.com/u/106475?v=3","gravatar_id":"","url":"https://api.github.com/users/lacker","html_url":"https://github.com/lacker","followers_url":"https://api.github.com/users/lacker/followers","following_url":"https://api.github.com/users/lacker/following{/other_user}","gists_url":"https://api.github.com/users/lacker/gists{/gist_id}","starred_url":"https://api.github.com/users/lacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacker/subscriptions","organizations_url":"https://api.github.com/users/lacker/orgs","repos_url":"https://api.github.com/users/lacker/repos","events_url":"https://api.github.com/users/lacker/events{/privacy}","received_events_url":"https://api.github.com/users/lacker/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T23:12:38Z","updated_at":"2016-10-05T23:12:38Z","body":"Hey, I totally agree this should get updated to ES6. We have a bunch of folks working on the React docs this week on the new-docs branch and the format is a little bit different, so I can take this on."}}
{"actor":{"display_login":"lacker"}}