I'm brand new in React and working on an existing React-Redux application.
I am trying to redirect the user after an http Post to logout in middleware. The call completes successfully. the server terminates the session and ends up in the promise .then block :
import { push } from 'react-router-redux';
API.post(`/logout`).then(
(response) => {
next(push(`http://www.google.com`));
},
(message) => {
console.warn('logout was not successful');
}
But it never redirects. Is there another way to do redirect from within the Redux flow ?