{"action":"created","issue":{"url":"https://api.github.com/repos/reduxjs/redux/issues/2991","repository_url":"https://api.github.com/repos/reduxjs/redux","labels_url":"https://api.github.com/repos/reduxjs/redux/issues/2991/labels{/name}","comments_url":"https://api.github.com/repos/reduxjs/redux/issues/2991/comments","events_url":"https://api.github.com/repos/reduxjs/redux/issues/2991/events","html_url":"https://github.com/reduxjs/redux/issues/2991","id":323132691,"number":2991,"title":"i want dispatch more than one actions , but just do listen function once","user":{"login":"nokisnojok","id":19647275,"avatar_url":"https://avatars1.githubusercontent.com/u/19647275?v=4","gravatar_id":"","url":"https://api.github.com/users/nokisnojok","html_url":"https://github.com/nokisnojok","followers_url":"https://api.github.com/users/nokisnojok/followers","following_url":"https://api.github.com/users/nokisnojok/following{/other_user}","gists_url":"https://api.github.com/users/nokisnojok/gists{/gist_id}","starred_url":"https://api.github.com/users/nokisnojok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nokisnojok/subscriptions","organizations_url":"https://api.github.com/users/nokisnojok/orgs","repos_url":"https://api.github.com/users/nokisnojok/repos","events_url":"https://api.github.com/users/nokisnojok/events{/privacy}","received_events_url":"https://api.github.com/users/nokisnojok/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-15T09:18:01Z","updated_at":"2018-05-15T14:59:50Z","closed_at":"2018-05-15T14:59:50Z","author_association":"NONE","body":"i see your code.\r\ni want change it.\r\njust change the function which name is \"dispatch\",\r\n\r\nyour code: \r\n```\r\nfunction dispatch(action) {\r\n    if (!isPlainObject(action)) {\r\n      throw new Error(\r\n        'Actions must be plain objects. ' +\r\n          'Use custom middleware for async actions.'\r\n      )\r\n    }\r\n\r\n    if (typeof action.type === 'undefined') {\r\n      throw new Error(\r\n        'Actions may not have an undefined \"type\" property. ' +\r\n          'Have you misspelled a constant?'\r\n      )\r\n    }\r\n\r\n    if (isDispatching) {\r\n      throw new Error('Reducers may not dispatch actions.')\r\n    }\r\n\r\n    try {\r\n      isDispatching = true\r\n      currentState = currentReducer(currentState, action)\r\n    } finally {\r\n      isDispatching = false\r\n    }\r\n\r\n    const listeners = (currentListeners = nextListeners)\r\n    for (let i = 0; i < listeners.length; i++) {\r\n      const listener = listeners[i]\r\n      listener()\r\n    }\r\n\r\n    return action\r\n  }\r\n```\r\n\r\nafter change \r\n\r\n```\r\nfunction dispatch(...actions) {\r\n\r\n    if (actions.some((action, index, arr) => {\r\n        return !isPlainObject(action)\r\n    })) {\r\n        throw new Error(\r\n            'Actions must be plain objects. ' +\r\n            'Use custom middleware for async actions.'\r\n        )\r\n    }\r\n\r\n    // if (!isPlainObject(action)) {\r\n    //     throw new Error(\r\n    //         'Actions must be plain objects. ' +\r\n    //         'Use custom middleware for async actions.'\r\n    //     )\r\n    // }\r\n    if (actions.some((action, index, arr) => {\r\n        return typeof action.type === 'undefined'\r\n    })) {\r\n        throw new Error(\r\n            'Actions must be plain objects. ' +\r\n            'Use custom middleware for async actions.'\r\n        )\r\n    }\r\n\r\n\r\n    // if (typeof action.type === 'undefined') {\r\n    //     throw new Error(\r\n    //         'Actions may not have an undefined \"type\" property. ' +\r\n    //         'Have you misspelled a constant?'\r\n    //     )\r\n    // }\r\n\r\n    if (isDispatching) {\r\n        throw new Error('Reducers may not dispatch actions.')\r\n    }\r\n\r\n    try {\r\n        isDispatching = true\r\n        currentState = actions.reduce(currentReducer, currentState)\r\n        // currentState = currentReducer(currentState, action)\r\n    } finally {\r\n        isDispatching = false\r\n    }\r\n\r\n    const listeners = (currentListeners = nextListeners)\r\n    for (let i = 0; i < listeners.length; i++) {\r\n        const listener = listeners[i]\r\n        listener()\r\n    }\r\n\r\n    return actions\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/reduxjs/redux/issues/comments/389199007","html_url":"https://github.com/reduxjs/redux/issues/2991#issuecomment-389199007","issue_url":"https://api.github.com/repos/reduxjs/redux/issues/2991","id":389199007,"user":{"login":"timdorr","id":17882,"avatar_url":"https://avatars2.githubusercontent.com/u/17882?v=4","gravatar_id":"","url":"https://api.github.com/users/timdorr","html_url":"https://github.com/timdorr","followers_url":"https://api.github.com/users/timdorr/followers","following_url":"https://api.github.com/users/timdorr/following{/other_user}","gists_url":"https://api.github.com/users/timdorr/gists{/gist_id}","starred_url":"https://api.github.com/users/timdorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdorr/subscriptions","organizations_url":"https://api.github.com/users/timdorr/orgs","repos_url":"https://api.github.com/users/timdorr/repos","events_url":"https://api.github.com/users/timdorr/events{/privacy}","received_events_url":"https://api.github.com/users/timdorr/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T14:59:50Z","updated_at":"2018-05-15T14:59:50Z","author_association":"MEMBER","body":"Thanks, but this isn't something we're willing to change. It's a core behavior of Redux."}}
{"actor":{"display_login":"timdorr"}}