{"action":"created","issue":{"url":"https://api.github.com/repos/ianstormtaylor/slate/issues/1975","repository_url":"https://api.github.com/repos/ianstormtaylor/slate","labels_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/1975/labels{/name}","comments_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/1975/comments","events_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/1975/events","html_url":"https://github.com/ianstormtaylor/slate/pull/1975","id":341749340,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxODEyNzk4","number":1975,"title":"Upgrade to React v16 lifecycle","user":{"login":"zhujinxuan","id":746159,"node_id":"MDQ6VXNlcjc0NjE1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/746159?v=4","gravatar_id":"","url":"https://api.github.com/users/zhujinxuan","html_url":"https://github.com/zhujinxuan","followers_url":"https://api.github.com/users/zhujinxuan/followers","following_url":"https://api.github.com/users/zhujinxuan/following{/other_user}","gists_url":"https://api.github.com/users/zhujinxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhujinxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhujinxuan/subscriptions","organizations_url":"https://api.github.com/users/zhujinxuan/orgs","repos_url":"https://api.github.com/users/zhujinxuan/repos","events_url":"https://api.github.com/users/zhujinxuan/events{/privacy}","received_events_url":"https://api.github.com/users/zhujinxuan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-07-17T03:07:50Z","updated_at":"2018-08-16T21:59:22Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ianstormtaylor/slate/pulls/1975","html_url":"https://github.com/ianstormtaylor/slate/pull/1975","diff_url":"https://github.com/ianstormtaylor/slate/pull/1975.diff","patch_url":"https://github.com/ianstormtaylor/slate/pull/1975.patch"},"body":"#### Is this adding or improving a _feature_ or fixing a _bug_?\r\n\r\nfeature\r\n\r\n#### What's the new behavior?\r\n\r\n1. use `memoize-one` instead of state as recommended in reactJS https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#what-about-memoization\r\n2. value is handled by and only `props.onChange`, then no state.value is provided.\r\n3. Remove flushChange in componentDidUpdate.  After mount, all update will go to onEvent->change->onChange->`props.onChange`\r\n\r\n#### Does this fix any issues or need any specific reviewers?\r\n\r\nFixes: #1426 #1427 \r\nReviewers: @\r\n"},"comment":{"url":"https://api.github.com/repos/ianstormtaylor/slate/issues/comments/413697519","html_url":"https://github.com/ianstormtaylor/slate/pull/1975#issuecomment-413697519","issue_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/1975","id":413697519,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzY5NzUxOQ==","user":{"login":"ianstormtaylor","id":311752,"node_id":"MDQ6VXNlcjMxMTc1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/311752?v=4","gravatar_id":"","url":"https://api.github.com/users/ianstormtaylor","html_url":"https://github.com/ianstormtaylor","followers_url":"https://api.github.com/users/ianstormtaylor/followers","following_url":"https://api.github.com/users/ianstormtaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianstormtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianstormtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianstormtaylor/subscriptions","organizations_url":"https://api.github.com/users/ianstormtaylor/orgs","repos_url":"https://api.github.com/users/ianstormtaylor/repos","events_url":"https://api.github.com/users/ianstormtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianstormtaylor/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T21:59:22Z","updated_at":"2018-08-16T21:59:22Z","author_association":"OWNER","body":"Thanks @zhujinxuan! I've added a single commit there which refactors things a bit, and cleans up some of the comments and logging. It will hopefully make the code slightly easier to follow. (Allow it will still be confusing because memoization is inherently confusing I think.)\r\n\r\nThanks for working on this!"}}
{"actor":{"display_login":"ianstormtaylor"}}