npm.io
0.0.5 • Published 4 years ago

affirmation-saga

Licence
ISC
Version
0.0.5
Deps
0
Size
274 kB
Vulns
0
Weekly
0

what is this?

learn redux-saga structure with login flow

#Installation

npm i affirmation-saga --save

Then...

import {AffirmSaga} from 'affirmation-saga';


function callApis(props) {

try {

const {data, url, post} = props.payload;

     const usersData = yield call(implementPromiseAction, props, function* () {


       const param = {
         data: {...data},
         url: url,
       };

       const api_config = {axios related parameter,...param};

       return yield call(() => axios(api_config));
     });

     return usersData;

} catch (e) {...}
}

Options

get two more option in to show how to use react-saga with redux-persist

Keywords