Interface Connect<DefaultState> interface Connect < DefaultState > { ( ) : InferableComponentEnhancer < DispatchProp < AnyAction > > ; < TStateProps , no_dispatch , TOwnProps , State > ( mapStateToProps ) : InferableComponentEnhancerWithProps < TStateProps & DispatchProp < AnyAction > , TOwnProps > ; < no_state , TDispatchProps , TOwnProps > ( mapStateToProps ,
mapDispatchToProps ) : InferableComponentEnhancerWithProps < TDispatchProps , TOwnProps > ; < no_state , TDispatchProps , TOwnProps > ( mapStateToProps ,
mapDispatchToProps ) : InferableComponentEnhancerWithProps < ResolveThunks < TDispatchProps > , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps ,
mapDispatchToProps ) : InferableComponentEnhancerWithProps < TStateProps & TDispatchProps , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps ,
mapDispatchToProps ) : InferableComponentEnhancerWithProps < TStateProps , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps ,
mapDispatchToProps ) : InferableComponentEnhancerWithProps < TStateProps & ResolveThunks < TDispatchProps > , TOwnProps > ; < no_state , no_dispatch , TOwnProps , TMergedProps > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > ; < TStateProps , no_dispatch , TOwnProps , TMergedProps , State > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > ; < no_state , TDispatchProps , TOwnProps , TMergedProps > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > ; < TStateProps , no_dispatch , TOwnProps , State > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ,
options ) : InferableComponentEnhancerWithProps < DispatchProp < AnyAction > & TStateProps , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ,
options ) : InferableComponentEnhancerWithProps < TDispatchProps , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ,
options ) : InferableComponentEnhancerWithProps < ResolveThunks < TDispatchProps > , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ,
options ) : InferableComponentEnhancerWithProps < TStateProps & TDispatchProps , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ,
options ) : InferableComponentEnhancerWithProps < TStateProps & ResolveThunks < TDispatchProps > , TOwnProps > ; < TStateProps , TDispatchProps , TOwnProps , TMergedProps , State > ( mapStateToProps ,
mapDispatchToProps ,
mergeProps ,
options ? ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > ; } Connect ( ) : InferableComponentEnhancer < DispatchProp < AnyAction > > Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:46 Connect < TStateProps , no_dispatch , TOwnProps , State > ( mapStateToProps ) : InferableComponentEnhancerWithProps < TStateProps & DispatchProp < AnyAction > , TOwnProps > Type Parameters TStateProps = {} no_dispatch = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:48 Connect < no_state , TDispatchProps , TOwnProps > ( mapStateToProps , mapDispatchToProps ) : InferableComponentEnhancerWithProps < TDispatchProps , TOwnProps > Type Parameters no_state = {} TDispatchProps = {} TOwnProps = {} Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:50 Connect < no_state , TDispatchProps , TOwnProps > ( mapStateToProps , mapDispatchToProps ) : InferableComponentEnhancerWithProps < ResolveThunks < TDispatchProps > , TOwnProps > Type Parameters no_state = {} TDispatchProps = {} TOwnProps = {} Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:52 Connect < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps , mapDispatchToProps ) : InferableComponentEnhancerWithProps < TStateProps & TDispatchProps , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:54 Connect < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps , mapDispatchToProps ) : InferableComponentEnhancerWithProps < TStateProps , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:56 Connect < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps , mapDispatchToProps ) : InferableComponentEnhancerWithProps < TStateProps & ResolveThunks < TDispatchProps > , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:58 Connect < no_state , no_dispatch , TOwnProps , TMergedProps > ( mapStateToProps , mapDispatchToProps , mergeProps ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > Type Parameters no_state = {} no_dispatch = {} TOwnProps = {} TMergedProps = {} Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:60 Connect < TStateProps , no_dispatch , TOwnProps , TMergedProps , State > ( mapStateToProps , mapDispatchToProps , mergeProps ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > Type Parameters TStateProps = {} no_dispatch = {} TOwnProps = {} TMergedProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:62 Connect < no_state , TDispatchProps , TOwnProps , TMergedProps > ( mapStateToProps , mapDispatchToProps , mergeProps ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > Type Parameters no_state = {} TDispatchProps = {} TOwnProps = {} TMergedProps = {} Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:64 Connect < TStateProps , no_dispatch , TOwnProps , State > ( mapStateToProps , mapDispatchToProps , mergeProps , options ) : InferableComponentEnhancerWithProps < DispatchProp < AnyAction > & TStateProps , TOwnProps > Type Parameters TStateProps = {} no_dispatch = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:66 Connect < TStateProps , TDispatchProps , TOwnProps > ( mapStateToProps , mapDispatchToProps , mergeProps , options ) : InferableComponentEnhancerWithProps < TDispatchProps , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:68 Connect < TStateProps , TDispatchProps , TOwnProps > ( mapStateToProps , mapDispatchToProps , mergeProps , options ) : InferableComponentEnhancerWithProps < ResolveThunks < TDispatchProps > , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:70 Connect < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps , mapDispatchToProps , mergeProps , options ) : InferableComponentEnhancerWithProps < TStateProps & TDispatchProps , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:72 Connect < TStateProps , TDispatchProps , TOwnProps , State > ( mapStateToProps , mapDispatchToProps , mergeProps , options ) : InferableComponentEnhancerWithProps < TStateProps & ResolveThunks < TDispatchProps > , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:74 Connect < TStateProps , TDispatchProps , TOwnProps , TMergedProps , State > ( mapStateToProps , mapDispatchToProps , mergeProps , options ? ) : InferableComponentEnhancerWithProps < TMergedProps , TOwnProps > Type Parameters TStateProps = {} TDispatchProps = {} TOwnProps = {} TMergedProps = {} State = DefaultState Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:76
Connects a React component to a Redux store.
Without arguments, just wraps the component, without changing the behavior / props
If 2 params are passed (3rd param, mergeProps, is skipped), default behavior is to override ownProps (as stated in the docs), so what remains is everything that's not a state or dispatch prop
When 3rd param is passed, we don't know if ownProps propagate and whether they should be valid component props, because it depends on mergeProps implementation. As such, it is the user's responsibility to extend ownProps interface from state or dispatch props or both when applicable