I have a simple component like this:
import React from 'react';
type Props = {
name: string
};
export default class MyComponent extends React.Component<Props> {
render() {
return (<p>{this.props.name}</p>);
}
}
I get the following error:
React.Component (type application of property
Component) Too few type arguments. Expected at least 3 DefaultProps, Props, State (See type parameters of definition here).
"flow-bin": "^0.54.0"
That's weird, if you look at this example, it does typecheck. Are you sure that you don't also have a global version of flow that it not up to date?
@AugustinLF It turns out I had [email protected] installed globally. Thank you!
Most helpful comment
@AugustinLF It turns out I had
[email protected]installed globally. Thank you!