{"action":"created","issue":{"url":"https://api.github.com/repos/rogeriochaves/jasmine-react-diff/issues/2","labels_url":"https://api.github.com/repos/rogeriochaves/jasmine-react-diff/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/rogeriochaves/jasmine-react-diff/issues/2/comments","events_url":"https://api.github.com/repos/rogeriochaves/jasmine-react-diff/issues/2/events","html_url":"https://github.com/rogeriochaves/jasmine-react-diff/issues/2","id":112116530,"number":2,"title":"Does not handle arrays of React Elements","user":{"login":"johnnyreilly","id":1010525,"avatar_url":"https://avatars.githubusercontent.com/u/1010525?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyreilly","html_url":"https://github.com/johnnyreilly","followers_url":"https://api.github.com/users/johnnyreilly/followers","following_url":"https://api.github.com/users/johnnyreilly/following{/other_user}","gists_url":"https://api.github.com/users/johnnyreilly/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyreilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyreilly/subscriptions","organizations_url":"https://api.github.com/users/johnnyreilly/orgs","repos_url":"https://api.github.com/users/johnnyreilly/repos","events_url":"https://api.github.com/users/johnnyreilly/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyreilly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-19T10:24:28Z","updated_at":"2015-11-01T06:49:37Z","closed_at":"2015-11-01T00:02:57Z","body":"Hey!\r\n\r\nI love what you've done here - I heard about it from @vvo [here](https://github.com/facebook/react/issues/4835#issuecomment-148708582).  The one thing that tripped me up was that it doesn't handle arrays of React Elements - it only accepts single React Elements.  \r\n\r\nI think this could be handled by going from this:\r\n\r\n```\r\nconst formatReactComponents = (defaultFormatter) => (value) =>\r\n  isReact(value) ? `\\n${reactFormatter(value)}\\n` : defaultFormatter(value);\r\n```\r\n\r\nTo this:\r\n\r\n```\r\nconst formatReactComponents = (defaultFormatter) => (value) =>\r\n  (isReact(value) || (Array.isArray(value) && value.every(isReact))) ? `\\n${reactFormatter(value)}\\n` : defaultFormatter(value);\r\n```\r\n\r\nWhat do you think?  Happy to submit PR.  Or alternatively emphasing in the docs that this doesn't cater for arrays of React Elements."},"comment":{"url":"https://api.github.com/repos/rogeriochaves/jasmine-react-diff/issues/comments/152800091","html_url":"https://github.com/rogeriochaves/jasmine-react-diff/issues/2#issuecomment-152800091","issue_url":"https://api.github.com/repos/rogeriochaves/jasmine-react-diff/issues/2","id":152800091,"user":{"login":"johnnyreilly","id":1010525,"avatar_url":"https://avatars.githubusercontent.com/u/1010525?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyreilly","html_url":"https://github.com/johnnyreilly","followers_url":"https://api.github.com/users/johnnyreilly/followers","following_url":"https://api.github.com/users/johnnyreilly/following{/other_user}","gists_url":"https://api.github.com/users/johnnyreilly/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyreilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyreilly/subscriptions","organizations_url":"https://api.github.com/users/johnnyreilly/orgs","repos_url":"https://api.github.com/users/johnnyreilly/repos","events_url":"https://api.github.com/users/johnnyreilly/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyreilly/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T06:49:37Z","updated_at":"2015-11-01T06:49:37Z","body":"Great!"}}