JSX element type does not have any construct or call signatures. Typescript

后端 未结 3 623
情话喂你
情话喂你 2021-01-18 06:10

In case compose is used there is an error JSX element type ‘Option’ does not have any construct or call signatures. \'redux\' version - 3.7.2

3条回答
  •  星月不相逢
    2021-01-18 06:22

    An updated answer; use the generics for compose:

    import React, { ComponentType, FC } from 'react';
    
    export default compose(
      withWidth,
      connect(
        mapStateToProps,
        mapDispatchToProps
      )
    )(Search)
    

提交回复
热议问题