{"action":"created","issue":{"url":"https://api.github.com/repos/leoasis/redux-immutable-state-invariant/issues/2","labels_url":"https://api.github.com/repos/leoasis/redux-immutable-state-invariant/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/leoasis/redux-immutable-state-invariant/issues/2/comments","events_url":"https://api.github.com/repos/leoasis/redux-immutable-state-invariant/issues/2/events","html_url":"https://github.com/leoasis/redux-immutable-state-invariant/issues/2","id":105027732,"number":2,"title":"Usage with \"in-flight\", non-serialisable actions.","user":{"login":"eldh","id":612703,"avatar_url":"https://avatars.githubusercontent.com/u/612703?v=3","gravatar_id":"","url":"https://api.github.com/users/eldh","html_url":"https://github.com/eldh","followers_url":"https://api.github.com/users/eldh/followers","following_url":"https://api.github.com/users/eldh/following{/other_user}","gists_url":"https://api.github.com/users/eldh/gists{/gist_id}","starred_url":"https://api.github.com/users/eldh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldh/subscriptions","organizations_url":"https://api.github.com/users/eldh/orgs","repos_url":"https://api.github.com/users/eldh/repos","events_url":"https://api.github.com/users/eldh/events{/privacy}","received_events_url":"https://api.github.com/users/eldh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-05T13:41:46Z","updated_at":"2015-09-08T06:21:20Z","closed_at":"2015-09-08T06:21:20Z","body":"As discussed [here](https://github.com/acdlite/flux-standard-action/issues/9), FSA compliant actions can be non-serialisable while they are waiting for a promise to resolve, causing errors when trying to use this lib (JSON.serialize() fails). \r\n\r\nI have a [small example todo app](https://github.com/eldh/todo) that uses redux-actions and redux-promises, and I would love to find a way to add redux-immutable-state-invariant to it.\r\n\r\nNot sure how to go about doing that though, and I'm not sure my understanding of the problem is correct.\r\n\r\nI would guess though that the \"isFSA()\" and \"isSerializable()\" methods discussed in the issue mentioned above could be used to filter out actions that should not be checked. But then again, I'm not sure this lib should necessarily know too much about FSA... Perhaps it could be as easy as checking if the payload is a Promise?\r\n\r\nOr is it better to find a way to completely avoid non-serialisable actions?\r\n\r\nMaybe @acdlite has some input?"},"comment":{"url":"https://api.github.com/repos/leoasis/redux-immutable-state-invariant/issues/comments/138448061","html_url":"https://github.com/leoasis/redux-immutable-state-invariant/issues/2#issuecomment-138448061","issue_url":"https://api.github.com/repos/leoasis/redux-immutable-state-invariant/issues/2","id":138448061,"user":{"login":"eldh","id":612703,"avatar_url":"https://avatars.githubusercontent.com/u/612703?v=3","gravatar_id":"","url":"https://api.github.com/users/eldh","html_url":"https://github.com/eldh","followers_url":"https://api.github.com/users/eldh/followers","following_url":"https://api.github.com/users/eldh/following{/other_user}","gists_url":"https://api.github.com/users/eldh/gists{/gist_id}","starred_url":"https://api.github.com/users/eldh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldh/subscriptions","organizations_url":"https://api.github.com/users/eldh/orgs","repos_url":"https://api.github.com/users/eldh/repos","events_url":"https://api.github.com/users/eldh/events{/privacy}","received_events_url":"https://api.github.com/users/eldh/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T06:21:20Z","updated_at":"2015-09-08T06:21:20Z","body":"Sorry, it was just me who didn't understand the importance of the order of middleware in this case. Placing it at the end works fine."}}