Try to search your question here, if you can't find : Ask Any Question Now ?

what import statements do I need to use with redux-promise?

HomeCategory: stackoverflowwhat import statements do I need to use with redux-promise?
julie asked 2 weeks ago

How do I setup the redux-promise middleware, specifically what import and configurations statements do I need?

https://github.com/acdlite/redux-promise

The readme states import promiseMiddleware from 'redux-promise', and I’m assuming I have to import createAction as well.. but is that all I need, or do I need to configure or add it to the redux configuration somehow?

Is this all I need to do?

actions/SampleActions.js

import promiseMiddleware from 'redux-promise';
import { createAction } from 'redux-actions';
import { WebAPI } from '../utils/WebAPI';

export const getThing = createAction('GET_THING', WebAPI.getThing);
export const createThing = createAction('POST_THING', WebAPI.createThing);
1 Answers
Best Answer
Jyoti answered 2 weeks ago
Your Answer

0 + 12 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com