I want to call SPFX react child component from parent component . But I am getting error while creating react component .
Error:
Declaration or statement expected. Cannot find name 'div'. Type 'boolean' is not assignable to type 'ReactElement'.
Child Component:
export interface IDCLabelProps {
thisCount: number;
parenIid :number;
}
export default class ShopingCart extends React.Component<
IDCLabelProps,any,any>
{
public constructor(props: IDCLabelProps, state: IDCLabelProps) {
super(props);
public render(): React.ReactElement<IDCLabelProps> {
return (
<div className={styles.shopingCart}>
</div>
);
}
}
How can I fix this ? Please help .