Overview of the connect HOC in react-redux
connect function is a Higher-Order Component (HOC) used to filter or pre-process states and actions from the Redux store before they are passed as props to a React component. While it remains available and is primarily used for Class Components, useSelector and useDispatch hooks are the recommended approach for functional components since react-redux v7.1 (2019).connect([mapStateToProps], [mapDispatchToProps], [mergeProps], [options]);