{"action":"created","issue":{"url":"https://api.github.com/repos/developit/preact/issues/374","repository_url":"https://api.github.com/repos/developit/preact","labels_url":"https://api.github.com/repos/developit/preact/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/developit/preact/issues/374/comments","events_url":"https://api.github.com/repos/developit/preact/issues/374/events","html_url":"https://github.com/developit/preact/issues/374","id":185737958,"number":374,"title":"While testing shouldComponentUpdate it seems that the this.props.children never equals nextProps.children","user":{"login":"tkh44","id":662750,"avatar_url":"https://avatars.githubusercontent.com/u/662750?v=3","gravatar_id":"","url":"https://api.github.com/users/tkh44","html_url":"https://github.com/tkh44","followers_url":"https://api.github.com/users/tkh44/followers","following_url":"https://api.github.com/users/tkh44/following{/other_user}","gists_url":"https://api.github.com/users/tkh44/gists{/gist_id}","starred_url":"https://api.github.com/users/tkh44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkh44/subscriptions","organizations_url":"https://api.github.com/users/tkh44/orgs","repos_url":"https://api.github.com/users/tkh44/repos","events_url":"https://api.github.com/users/tkh44/events{/privacy}","received_events_url":"https://api.github.com/users/tkh44/received_events","type":"User","site_admin":false},"labels":[{"id":430613463,"url":"https://api.github.com/repos/developit/preact/labels/discussion","name":"discussion","color":"f9d0c4","default":false},{"id":394826039,"url":"https://api.github.com/repos/developit/preact/labels/feedback%20needed","name":"feedback needed","color":"006b75","default":false},{"id":258981562,"url":"https://api.github.com/repos/developit/preact/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-27T17:55:00Z","updated_at":"2016-10-27T22:02:01Z","closed_at":null,"body":"I was doing some testing on https://github.com/tkh44/shallow-compare and it seems that shouldComponentUpdate will always fail based on props being different.  The property `children` is always different. \r\n\r\nI may be missing something or doing something wrong in my tests, but I felt like I should ask about it.\r\n\r\nI created a branch with a logging so the issue could be seen here: https://github.com/tkh44/shallow-compare/tree/testing-preact-children. It is set up just like most of preact's family of repos so just `npm install` and `npm t`.\r\n\r\nHere is what i'm getting in the logs\r\n<details>\r\nrender red\r\n\r\nprevProps {\"color\":\"red\",\"children\":[\"test\"]}\r\nnextProps {\"color\":\"blue\",\"children\":[\"test\"]}\r\ncolor is not equal value a:  red value b:  blue\r\npropsDiffers true\r\nstateDiffers false\r\nshouldComponentUpdate true\r\ncolor is not equal value a:  red value b:  blue\r\npropsDiffers true\r\nstateDiffers false\r\nrender blue\r\n\r\nprevProps {\"color\":\"blue\",\"children\":[\"test\"]}\r\nnextProps {\"color\":\"blue\",\"children\":[\"test\"]}\r\nchildren is not equal value a:  [ 'test' ] value b:  [ 'test' ]\r\npropsDiffers true\r\nstateDiffers false\r\nshouldComponentUpdate true\r\nchildren is not equal value a:  [ 'test' ] value b:  [ 'test' ]\r\npropsDiffers true\r\nstateDiffers false\r\nrender blue\r\n</details>"},"comment":{"url":"https://api.github.com/repos/developit/preact/issues/comments/256782725","html_url":"https://github.com/developit/preact/issues/374#issuecomment-256782725","issue_url":"https://api.github.com/repos/developit/preact/issues/374","id":256782725,"user":{"login":"tkh44","id":662750,"avatar_url":"https://avatars.githubusercontent.com/u/662750?v=3","gravatar_id":"","url":"https://api.github.com/users/tkh44","html_url":"https://github.com/tkh44","followers_url":"https://api.github.com/users/tkh44/followers","following_url":"https://api.github.com/users/tkh44/following{/other_user}","gists_url":"https://api.github.com/users/tkh44/gists{/gist_id}","starred_url":"https://api.github.com/users/tkh44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkh44/subscriptions","organizations_url":"https://api.github.com/users/tkh44/orgs","repos_url":"https://api.github.com/users/tkh44/repos","events_url":"https://api.github.com/users/tkh44/events{/privacy}","received_events_url":"https://api.github.com/users/tkh44/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T22:02:01Z","updated_at":"2016-10-27T22:02:01Z","body":"@developit correct. If the component is the only child shallow comparing works as expected, but not multiple children."}}
{"actor":{"display_login":"tkh44"}}