Closed ibc closed 7 years ago
i believe payload
will contain the result of the promise for non-failure cases,
is that what u are asking...?
Ok, so in success I should just call payload.promise().then((result) => so I get the result. Right, sorry.
BTW should the promise be set into action? Or into action.payload? The example uses action.promise but it fails when calling handle later (bad usage reported by the lib itself).
payload
should be the result of the promise, not the promise itself, so easier than what u were thinking... 👍
Clear. Thanks.
So, how to use/get the result of
Api.getFoo(id)
within the reducer?