{"action":"created","issue":{"url":"https://api.github.com/repos/zliuwd/learningnote/issues/66","repository_url":"https://api.github.com/repos/zliuwd/learningnote","labels_url":"https://api.github.com/repos/zliuwd/learningnote/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/zliuwd/learningnote/issues/66/comments","events_url":"https://api.github.com/repos/zliuwd/learningnote/issues/66/events","html_url":"https://github.com/zliuwd/learningnote/issues/66","id":244887606,"number":66,"title":"关于React编写规则补","user":{"login":"zliuwd","id":25130704,"avatar_url":"https://avatars0.githubusercontent.com/u/25130704?v=4","gravatar_id":"","url":"https://api.github.com/users/zliuwd","html_url":"https://github.com/zliuwd","followers_url":"https://api.github.com/users/zliuwd/followers","following_url":"https://api.github.com/users/zliuwd/following{/other_user}","gists_url":"https://api.github.com/users/zliuwd/gists{/gist_id}","starred_url":"https://api.github.com/users/zliuwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zliuwd/subscriptions","organizations_url":"https://api.github.com/users/zliuwd/orgs","repos_url":"https://api.github.com/users/zliuwd/repos","events_url":"https://api.github.com/users/zliuwd/events{/privacy}","received_events_url":"https://api.github.com/users/zliuwd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-23T04:20:41Z","updated_at":"2017-09-29T20:28:16Z","closed_at":null,"author_association":"OWNER","body":"1.component 可以用function来定义，也可以用class,后者只是语法问题。\n\n2.一个文件内可以定义多个component,输出时只输出需要输出那个就可以，render每一个component都可以有，里面是虚拟的dom\n\n"},"comment":{"url":"https://api.github.com/repos/zliuwd/learningnote/issues/comments/333230888","html_url":"https://github.com/zliuwd/learningnote/issues/66#issuecomment-333230888","issue_url":"https://api.github.com/repos/zliuwd/learningnote/issues/66","id":333230888,"user":{"login":"zliuwd","id":25130704,"avatar_url":"https://avatars0.githubusercontent.com/u/25130704?v=4","gravatar_id":"","url":"https://api.github.com/users/zliuwd","html_url":"https://github.com/zliuwd","followers_url":"https://api.github.com/users/zliuwd/followers","following_url":"https://api.github.com/users/zliuwd/following{/other_user}","gists_url":"https://api.github.com/users/zliuwd/gists{/gist_id}","starred_url":"https://api.github.com/users/zliuwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zliuwd/subscriptions","organizations_url":"https://api.github.com/users/zliuwd/orgs","repos_url":"https://api.github.com/users/zliuwd/repos","events_url":"https://api.github.com/users/zliuwd/events{/privacy}","received_events_url":"https://api.github.com/users/zliuwd/received_events","type":"User","site_admin":false},"created_at":"2017-09-29T20:28:16Z","updated_at":"2017-09-29T20:28:16Z","author_association":"OWNER","body":"# 如何写带state的组件\r\n第一步：`class App extends React.Component`\r\n第二部：\r\n```\r\nconstructor(props) {\r\nsuper(props);\r\nthis.state={\r\n      iniatil:\" \"\r\n    }\r\n}\r\n```\r\n第三部：直接在这个component里面写event函数，不用到render()下面写\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"zliuwd"}}