Estoy usando "redux-api-middleware" para enviar acciones al backend. Uso redux para procesar los datos recibidos del backend.
export const example_action = () => createAction({ endpoint: 'https://expample/', method: 'POST', body: bodyExpamle headers: {}, types: [ REQUEST, SUCCESS, FAILURE ] })
Para no transferir grandes volúmenes del frontend al backend, y luego de regreso, quiero guardar su carga útil en la tienda redux cuando se solicita, pero cuando el reductor activa el tipo SOLICITUD, la acción contiene solo el campo de tipo sin el carga útil. Dime cómo obtener la carga útil.
export default function (state = initialState, action) { switch (action.type) { case 'REQUEST': { // HERE ACTION HAVE ONLY TYPE FIELD case 'SUCCESS': //HERE ACTION HAVE PAYLOAD default: return state } }