I have an action creator in redux like so:
export const sendInfo = data => async dispatch => {
try {
await dispatch({
myCode
},
})
} catch (e) {
browserHistory.push('/error')
return history.replace('/error)
}
}
but the url is changing to /error
but it's not changing the view. when I refresh the page it is hitting my error page.
how can I fix this?