Answer the question
In order to leave comments, you need to log in
How to learn access to state in redux in action?
When I do a dispatch, I use a function where I need access to the global State. Initially, I used a closure and the getState method:
export function addToPreList(name, count){
return (dispatch, getState) => {
}
}
but in this case, for some reason, the props of the component itself was not updated, which received properties by using connect(mapStateToProps)
Is there another way to access the global State?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question