# Interface Connect<DefaultState>

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

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>;
}

#### Type Parameters

- DefaultState = unknown

- Connect(): InferableComponentEnhancer<DispatchProp<AnyAction>>

- #### Returns 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>

- mapState only

  #### Type Parameters

  - TStateProps = {}
  - no_dispatch = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>

  #### Returns InferableComponentEnhancerWithProps<TStateProps & DispatchProp<AnyAction>, TOwnProps>

  - 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>

- mapDispatch only (as a function)

  #### Type Parameters

  - no_state = {}
  - TDispatchProps = {}
  - TOwnProps = {}

  #### Parameters

  - mapStateToProps: null
  - mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>

  #### Returns InferableComponentEnhancerWithProps<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>

- mapDispatch only (as an object)

  #### Type Parameters

  - no_state = {}
  - TDispatchProps = {}
  - TOwnProps = {}

  #### Parameters

  - mapStateToProps: null
  - mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>

  #### Returns InferableComponentEnhancerWithProps<ResolveThunks<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>

- mapState and mapDispatch (as a function)

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>

  #### Returns InferableComponentEnhancerWithProps<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:54
- Connect<TStateProps, TDispatchProps, TOwnProps, State>(mapStateToProps, mapDispatchToProps): InferableComponentEnhancerWithProps<TStateProps, TOwnProps>

- mapState and mapDispatch (nullish)

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: null

  #### Returns InferableComponentEnhancerWithProps<TStateProps, TOwnProps>

  - 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>

- mapState and mapDispatch (as an object)

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>

  #### Returns InferableComponentEnhancerWithProps<TStateProps & ResolveThunks<TDispatchProps>, TOwnProps>

  - 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>

- mergeProps only

  #### Type Parameters

  - no_state = {}
  - no_dispatch = {}
  - TOwnProps = {}
  - TMergedProps = {}

  #### Parameters

  - mapStateToProps: null
  - mapDispatchToProps: null
  - mergeProps: MergeProps<undefined, DispatchProp<AnyAction>, TOwnProps, TMergedProps>

  #### Returns InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>

  - 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>

- mapState and mergeProps

  #### Type Parameters

  - TStateProps = {}
  - no_dispatch = {}
  - TOwnProps = {}
  - TMergedProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: null
  - mergeProps: MergeProps<TStateProps, DispatchProp<AnyAction>, TOwnProps, TMergedProps>

  #### Returns InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>

  - 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>

- mapDispatch (as a object) and mergeProps

  #### Type Parameters

  - no_state = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - TMergedProps = {}

  #### Parameters

  - mapStateToProps: null
  - mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>
  - mergeProps: MergeProps<undefined, TDispatchProps, TOwnProps, TMergedProps>

  #### Returns InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>

  - 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>

- mapState and options

  #### Type Parameters

  - TStateProps = {}
  - no_dispatch = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: null
  - mergeProps: null
  - options: ConnectOptions<State, TStateProps, TOwnProps, {}>

  #### Returns InferableComponentEnhancerWithProps<DispatchProp<AnyAction> & TStateProps, TOwnProps>

  - 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>

- mapDispatch (as a function) and options

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}

  #### Parameters

  - mapStateToProps: null
  - mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>
  - mergeProps: null
  - options: ConnectOptions<{}, TStateProps, TOwnProps, {}>

  #### Returns InferableComponentEnhancerWithProps<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>

- mapDispatch (as an object) and options

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}

  #### Parameters

  - mapStateToProps: null
  - mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>
  - mergeProps: null
  - options: ConnectOptions<{}, TStateProps, TOwnProps, {}>

  #### Returns InferableComponentEnhancerWithProps<ResolveThunks<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>

- mapState, mapDispatch (as a function), and options

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>
  - mergeProps: null
  - options: ConnectOptions<State, TStateProps, TOwnProps, {}>

  #### Returns InferableComponentEnhancerWithProps<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:72
- Connect<TStateProps, TDispatchProps, TOwnProps, State>(mapStateToProps, mapDispatchToProps, mergeProps, options): InferableComponentEnhancerWithProps<TStateProps & ResolveThunks<TDispatchProps>, TOwnProps>

- mapState, mapDispatch (as an object), and options

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>
  - mergeProps: null
  - options: ConnectOptions<State, TStateProps, TOwnProps, {}>

  #### Returns InferableComponentEnhancerWithProps<TStateProps & ResolveThunks<TDispatchProps>, TOwnProps>

  - 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>

- mapState, mapDispatch, mergeProps, and options

  #### Type Parameters

  - TStateProps = {}
  - TDispatchProps = {}
  - TOwnProps = {}
  - TMergedProps = {}
  - State = DefaultState

  #### Parameters

  - mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>
  - mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>
  - mergeProps: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>
  - `Optional` options: ConnectOptions<State, TStateProps, TOwnProps, TMergedProps>

  #### Returns InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>

  - Defined in common/temp/node_modules/.pnpm/react-redux@8.1.3_91ee3f21853aee6f4038f22086c31182/node_modules/react-redux/es/components/connect.d.ts:76