I'm using react-router-4 and the corresponding react-router-redux for this version is not yet stable. I'm curious if there are ways I can access history
from redux-observable
epic. Example:
export function profileDropdownEpic (action$, { getState, dispatch }{
return action$.ofType('SET_SELECTED_ITEM')
.mapTo(() => {
const selectedItem = getState().listDropdown.get('SelectedItem')
if (selectedItem === 'logout') {
history.push('/login')
}
return {}
})
}