Skip to content

Commit

Permalink
Merge pull request ManageIQ#4407 from Hyperkid123/v2v-redux-actions
Browse files Browse the repository at this point in the history
Added promise middleware, to enable v2v redux-actions.
  • Loading branch information
himdel authored Aug 3, 2018
2 parents 496028f + 7923965 commit 0936737
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/javascript/miq-redux/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import thunk from 'redux-thunk';
import { routerMiddleware } from 'connected-react-router';
import promiseMiddleware from 'redux-promise-middleware';

export const createMiddlewares = (history) => [
routerMiddleware(history),
thunk,
promiseMiddleware(),
];
2 changes: 2 additions & 0 deletions app/javascript/packs/application-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as helpers from '../miq-component/helpers';
import { rxSubject, sendDataWithRx, listenToRx } from '../miq_observable';

import { store, addReducer } from '../miq-redux';
import { history } from '../miq-component/react-history.ts';

ManageIQ.react = {
mount,
Expand All @@ -34,6 +35,7 @@ ManageIQ.component = {
ManageIQ.redux = {
store,
addReducer,
history,
};

ManageIQ.angular.rxSubject = rxSubject;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"react-router-dom": "^4.3.1",
"react-select": "~1.2.1",
"redux": "^4.0.0",
"redux-promise-middleware": "^5.1.1",
"redux-thunk": "^2.3.0",
"rxjs": "~5.6.0-forward-compat.2",
"text-encoder-lite": "git://github.com/coolaj86/TextEncoderLite.git#e1e031b",
Expand Down

0 comments on commit 0936737

Please sign in to comment.