{"action":"closed","issue":{"url":"https://api.github.com/repos/pburtchaell/redux-promise-middleware/issues/98","repository_url":"https://api.github.com/repos/pburtchaell/redux-promise-middleware","labels_url":"https://api.github.com/repos/pburtchaell/redux-promise-middleware/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/pburtchaell/redux-promise-middleware/issues/98/comments","events_url":"https://api.github.com/repos/pburtchaell/redux-promise-middleware/issues/98/events","html_url":"https://github.com/pburtchaell/redux-promise-middleware/issues/98","id":164697318,"number":98,"title":"how create a simple action with this middleware in a dedicate action file","user":{"login":"craigcosmo","id":538657,"avatar_url":"https://avatars.githubusercontent.com/u/538657?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcosmo","html_url":"https://github.com/craigcosmo","followers_url":"https://api.github.com/users/craigcosmo/followers","following_url":"https://api.github.com/users/craigcosmo/following{/other_user}","gists_url":"https://api.github.com/users/craigcosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcosmo/subscriptions","organizations_url":"https://api.github.com/users/craigcosmo/orgs","repos_url":"https://api.github.com/users/craigcosmo/repos","events_url":"https://api.github.com/users/craigcosmo/events{/privacy}","received_events_url":"https://api.github.com/users/craigcosmo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-10T03:29:56Z","updated_at":"2016-07-10T18:30:37Z","closed_at":"2016-07-10T18:30:37Z","body":"this is my store\r\n\r\n```jsx\r\nimport {applyMiddleware, createStore} from 'redux'\r\nimport logger from 'redux-logger'\r\nimport thunk from 'redux-thunk'\r\nimport axios from 'axios'\r\n\r\nconst reducer = (state ={}, action) => {\r\n\treturn state\r\n}\r\nconst middleware = applyMiddleware(thunk,logger())\r\nconst store = createStore(reducer, middleware)\r\n\r\nstore.dispatch( \r\n\ttype:'FETCH_USER',\r\n\tpayload: axios.get('http://rest.learncode.academy/api/wstern/users')\r\n})\r\n```\r\n\r\nAs you can see the fectch user action automatic dispatch by store when page load. What I want to do is I want move the fetcth_user action into it own file, lets call it userAction.js. And then dispatch fetch user in home.js page at componentDidMount cycle. How would do that?"}}
{"actor":{"display_login":"pburtchaell"}}