The fetchAPI middleware returns an object if the payload is of type JSON or nothing otherwise. The response object could be useful to performs some checks programmatically in the reducer, without having to rely on human-readable error details. The middleware should return an object containing the payload or nothing, and the response:
The
fetchAPI
middleware returns an object if the payload is of type JSON or nothing otherwise. The response object could be useful to performs some checks programmatically in the reducer, without having to rely on human-readable error details. The middleware should return an object containing the payload or nothing, and the response: