{"action":"created","issue":{"url":"https://api.github.com/repos/pburtchaell/react-notification/issues/92","repository_url":"https://api.github.com/repos/pburtchaell/react-notification","labels_url":"https://api.github.com/repos/pburtchaell/react-notification/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/pburtchaell/react-notification/issues/92/comments","events_url":"https://api.github.com/repos/pburtchaell/react-notification/issues/92/events","html_url":"https://github.com/pburtchaell/react-notification/issues/92","id":176927582,"number":92,"title":"Allow Immutable.List (or Iterable) to be passed","user":{"login":"cristian-sima","id":12199042,"avatar_url":"https://avatars.githubusercontent.com/u/12199042?v=3","gravatar_id":"","url":"https://api.github.com/users/cristian-sima","html_url":"https://github.com/cristian-sima","followers_url":"https://api.github.com/users/cristian-sima/followers","following_url":"https://api.github.com/users/cristian-sima/following{/other_user}","gists_url":"https://api.github.com/users/cristian-sima/gists{/gist_id}","starred_url":"https://api.github.com/users/cristian-sima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristian-sima/subscriptions","organizations_url":"https://api.github.com/users/cristian-sima/orgs","repos_url":"https://api.github.com/users/cristian-sima/repos","events_url":"https://api.github.com/users/cristian-sima/events{/privacy}","received_events_url":"https://api.github.com/users/cristian-sima/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pburtchaell/react-notification/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/pburtchaell/react-notification/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-09-14T14:47:31Z","updated_at":"2016-09-20T03:23:06Z","closed_at":null,"body":"Let's take this code:\r\n\r\n```jsx\r\nconst notifications = Immutable.List();\r\n\r\n...\r\n\r\nreturn <NotificationStack\r\n      notifications={notifications}\r\n      ...\r\n    />);\r\n```\r\n\r\nThe code works, but in the console I have this error: \r\n\r\n```\r\napp.js:9323 Warning: Failed prop type: Invalid prop `notifications` of type `object` supplied to `NotificationStack`, expected `array`.\r\n    in NotificationStack (created by SnackBar)\r\n    in SnackBar (created by Connect(SnackBar))\r\n    in Connect(SnackBar) (created by Sidebar)\r\n    in div (created by Sidebar)\r\n    in Sidebar (created by Connect(Sidebar))\r\n    in Connect(Sidebar) (created by CompanyPage)\r\n    in CompanyPage (created by Connect(CompanyPage))\r\n    in Connect(CompanyPage) (created by RouterContext)\r\n    in RouterContext (created by Router)\r\n    in Router (created by Root)\r\n    in Provider (created by Root)\r\n    in Root\r\n    in AppContainer\r\n```\r\n\r\n**I will lose the benefits of Immutable** if I change the code to `Immutable.List().toArray (or toJS))` as presented [here](http://stackoverflow.com/a/28060606/2415167)\r\n\r\nAlso [here](http://stackoverflow.com/a/37285430/2415167).\r\n\r\nOther comment: \r\n\r\n> Good question. I Wouldn't do it in the store though, since then you lose the abillity to do a simple object comparison (prevState !== this.state) if you'd want to optimize rendering with shouldComponentUpdate"},"comment":{"url":"https://api.github.com/repos/pburtchaell/react-notification/issues/comments/248191299","html_url":"https://github.com/pburtchaell/react-notification/issues/92#issuecomment-248191299","issue_url":"https://api.github.com/repos/pburtchaell/react-notification/issues/92","id":248191299,"user":{"login":"BerkeleyTrue","id":6775919,"avatar_url":"https://avatars.githubusercontent.com/u/6775919?v=3","gravatar_id":"","url":"https://api.github.com/users/BerkeleyTrue","html_url":"https://github.com/BerkeleyTrue","followers_url":"https://api.github.com/users/BerkeleyTrue/followers","following_url":"https://api.github.com/users/BerkeleyTrue/following{/other_user}","gists_url":"https://api.github.com/users/BerkeleyTrue/gists{/gist_id}","starred_url":"https://api.github.com/users/BerkeleyTrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BerkeleyTrue/subscriptions","organizations_url":"https://api.github.com/users/BerkeleyTrue/orgs","repos_url":"https://api.github.com/users/BerkeleyTrue/repos","events_url":"https://api.github.com/users/BerkeleyTrue/events{/privacy}","received_events_url":"https://api.github.com/users/BerkeleyTrue/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T03:23:06Z","updated_at":"2016-09-20T03:23:06Z","body":"Yes, checking for `map` would prevent strings, which are iterable, from passing validation."}}
{"actor":{"display_login":"BerkeleyTrue"}}