I have a mapDispatchToProps
function like this one below.
export function mapDispatchToProps(dispatch, ownProps) {
return {
handleChangeLang: changeLocaleDispatcher(dispatch),
handleChange: handleChangeDispatcher(dispatch),
handleSubmit: handleSubmitDispatcher(dispatch)
}
}
I just added redux-thunk
to my project so I can access state
from my action creators (think that's the correct term).
It doesn't seem there's any documentation in redux-thunk
outlining how to access getState
from mapDispatchToProps
. The docs dispatch
using the store.dispatch
method.