Medium Feed

 

Thursday, February 17, 2022

React/Redux hooks Vs equivalent implementation in React class feature

I am writing this article as an attempt to challenge myself to do a deep dive comparison between react/redux hooks used in functional component vs the equivalent implementation in react class component.

Note: I could not find equivalent class feature implementation for all the hooks. But I tried to the maximum which I can.

In this article, we will discuss the below list of mapping b/w react & redux hooks and it is equivalent implementation in class components. 

                                        React and Redux hooks Vs class feature mappings

useState hook Vs equivalent implementation in class Component


useEffect hook Vs equivalent implementation in class component


useRef hook Vs equivalent implementation in class Component


useMemo hook Vs equivalent implementation in class component


useSelector redux hook Vs redux Connect (mapStateToProps)


useDispatch redux hook Vs redux Connect(mapDispatchToProps)