I am using redux-auto but in the "init" (point 5) I want to hit two Api end-points. The documentation does not cover this case.
There is an example
export default function (user, payload, stage, result) {
switch(stage){
case 'FULFILLED':
return ?? result.config + result.userData ??
break;
case 'REJECTED':
console.error("problem loading user from server",result)
break;
case 'PENDING':
default :
break;
}
return user;
}
export function action (payload){
var endpoints = ['//localhost:3000/api/users/507f191e810c19729de860ea',
'https://api.mysite.com/users/settings/8B76YUTBI']
return fetch( ? )
}
How can I call two end-point when it only takes 1 promise?
I am working from the example where they load a user from an API https://github.com/codemeasandwich/redux-auto/tree/master/example
Thanks for any help