Requirement is to pass certain data to a component which will get rendered on a route change (programatically). Current I am using push from 'react-router-redux' without passing any data.
So I am navigating to /Animal and passing particular animals detail in data I want URl to show http://localhost/Animal
I am using React router 4.
import {push} from 'react-router-redux';
export function changeRoute(newRoute, data) {
return (dispatch) => dispatch(push(newroute));
}
How can this be achieved?