-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version: 2.3.1
Code
export class NavMenu extends React.Component<void, void> {...}
<NavMenu />Expected behavior:
It doesn't give a type error.
Actual behavior:
At the location the component is instantiated:
TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<NavMenu> & { children?: ReactNode; } & void'.
Type '{}' is not assignable to type 'void'.
This could be a typings error perhaps, but it seems wrong to have to create a functional component to not have any props, or have to make the props type undefined?
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created