Argument of type 'typeof test' is not assignable to parameter of type 'Component<{ children?: ReactNode; } & DispatchProp<any>>'

Viewed 2386
import * as React from 'react';

import {connect} from 'react-redux';


interface types{

type:string;
status?:boolean;

}


export class Test extends React.Component<undefined,any> {

constructor(props:undefined){
    super(props);
}

private test(){}

render(){
    return(
      <h1 onClick={this.test.bind(this)}>
        test
      </h1>
    )
}

}

export default connect()(Test); 

Error

Argument of type 'typeof test' is not assignable to parameter of type 'Component<{ children?: ReactNode; } & DispatchProp>'. ­­­­­­­­­­­­­­­­­­­­­

1 Answers
Related