All around it but not quite as I have enough of an idea of redux-thunk
and of react-router
but I am not getting this seemingly simple idea of:
I think what you are looking for is Redux Saga.
You can use the TakeEvery Effect, which will trigger the function you want every time a specific action is called.
Example :
import { takeEvery } from `redux-saga/effects`
function* fetchUser(action) {
...
}
function* watchFetchUser() {
yield takeEvery('USER_REQUESTED', fetchUser)
}
Take a look at the doc and read this article