{"action":"created","issue":{"url":"https://api.github.com/repos/gajus/redux-immutable/issues/9","repository_url":"https://api.github.com/repos/gajus/redux-immutable","labels_url":"https://api.github.com/repos/gajus/redux-immutable/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/gajus/redux-immutable/issues/9/comments","events_url":"https://api.github.com/repos/gajus/redux-immutable/issues/9/events","html_url":"https://github.com/gajus/redux-immutable/issues/9","id":106741720,"number":9,"title":"Redux 3.0.0 requires type property to be present in actions","user":{"login":"maikdiepenbroek","id":630870,"avatar_url":"https://avatars.githubusercontent.com/u/630870?v=3","gravatar_id":"","url":"https://api.github.com/users/maikdiepenbroek","html_url":"https://github.com/maikdiepenbroek","followers_url":"https://api.github.com/users/maikdiepenbroek/followers","following_url":"https://api.github.com/users/maikdiepenbroek/following{/other_user}","gists_url":"https://api.github.com/users/maikdiepenbroek/gists{/gist_id}","starred_url":"https://api.github.com/users/maikdiepenbroek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maikdiepenbroek/subscriptions","organizations_url":"https://api.github.com/users/maikdiepenbroek/orgs","repos_url":"https://api.github.com/users/maikdiepenbroek/repos","events_url":"https://api.github.com/users/maikdiepenbroek/events{/privacy}","received_events_url":"https://api.github.com/users/maikdiepenbroek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gajus/redux-immutable/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-09-16T10:08:32Z","updated_at":"2016-02-25T15:16:01Z","closed_at":"2016-01-27T18:54:12Z","body":"Since redux 3.0.0 action creators require the 'type' property not to be undefined, i've played around with it and just added it with the same value as the 'name' property to get rid of the error.\r\n\r\nThe error thrown: \r\nUncaught Error: Actions may not have an undefined \"type\" property. Have you misspelled a constant?"},"comment":{"url":"https://api.github.com/repos/gajus/redux-immutable/issues/comments/188831323","html_url":"https://github.com/gajus/redux-immutable/issues/9#issuecomment-188831323","issue_url":"https://api.github.com/repos/gajus/redux-immutable/issues/9","id":188831323,"user":{"login":"worldsayshi","id":930909,"avatar_url":"https://avatars.githubusercontent.com/u/930909?v=3","gravatar_id":"","url":"https://api.github.com/users/worldsayshi","html_url":"https://github.com/worldsayshi","followers_url":"https://api.github.com/users/worldsayshi/followers","following_url":"https://api.github.com/users/worldsayshi/following{/other_user}","gists_url":"https://api.github.com/users/worldsayshi/gists{/gist_id}","starred_url":"https://api.github.com/users/worldsayshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worldsayshi/subscriptions","organizations_url":"https://api.github.com/users/worldsayshi/orgs","repos_url":"https://api.github.com/users/worldsayshi/repos","events_url":"https://api.github.com/users/worldsayshi/events{/privacy}","received_events_url":"https://api.github.com/users/worldsayshi/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T15:16:01Z","updated_at":"2016-02-25T15:16:01Z","body":"I did a middleware workaround for this limitation. Might be useful to someone:\r\n``` javascript\r\nfunction fallbackTypeMiddleWare ({ getState }) {\r\n  return (nextMiddleWare) => (action) => {\r\n    if(!action.type){\r\n      action.type = \"MY_DEFAULT_ACTION_TYPE\";\r\n    }\r\n    let returnValue = nextMiddleWare(action);\r\n    return returnValue;\r\n  };\r\n};\r\n\r\nlet store = createStore(\r\n  myInitialData,\r\n  applyMiddleware(fallbackTypeMiddleWare)\r\n)\r\n```\r\n\r\nThe above code is slightly modified from when I tested it so might be typos."}}