Github user timmak commented on a diff in the pull request: https://github.com/apache/couchdb-fauxton/pull/849#discussion_r101054470 --- Diff: app/main.js --- @@ -57,24 +57,10 @@ $(document).on("click", "a:not([data-bypass])", function (evt) { } }); -function getReducers (r) { - - if (!r.length) { - return function () {}; - } - - return FauxtonAPI.reducers.reduce((el, acc) => { - acc[el] = el; - return acc; - }, {}); -} - -const reducer = getReducers(FauxtonAPI.reducers); - const middlewares = [thunk]; const store = createStore( - reducer, + combineReducers(FauxtonAPI.reducers), --- End diff -- Instead of having a single reducer we use redux combineReducer so we can name space the different reducers http://redux.js.org/docs/api/combineReducers.html
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---