What Redux analogue mapStateToProps and matchDispatchToProps when React application to add Redux-a functional component and hook useState?

I have the app on React and the file of my component functional and there use the hook useState. But you need to the app to add Redux. I heard that Redux for such cases(when there is a class component and there are hooks) there are analogues mapStateToProps and matchDispatchToProps, but I can't remember their names. As their names?
April 19th 20 at 12:07
1 answer
April 19th 20 at 12:09
Solution
You need to use the hooks offered react-redux: useSelector, useDispatch
https://react-redux.js.org/api/hooks - Jaden_Hartmann2 commented on April 19th 20 at 12:12
useSelector is an analogue mapStateToProps
useDispatch is an analogue matchDispatchToProps

understood correctly? - Lorna commented on April 19th 20 at 12:15
@Lorna, Yes) - Jaden_Hartmann2 commented on April 19th 20 at 12:18
@Jaden_Hartmann2, thank you) - Lorna commented on April 19th 20 at 12:21

Find more questions by tags ReduxReact