I find in big project some code:
const handlePay = () => {
someFunction()
.then(unwrapResult)
.then(
() => history.push(
authorizedRoutes.accruals.payment.link
),
() => {} /* what is it??? */
);
I dont understand for what this code: () => {}
Here is a closer look at .then()
p.then(function(value) {
// fulfillment
}, function(reason) {
// rejection
});
Its the reject
https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Promise/then