I'm using typescript 2.3.4 with React. I'm getting the error TS7006: Parameter 'props' implicitly has an 'any' type. Whats the correct way to cast props in typescript?
any help is appreciated.
interface State {
name: string;
}
interface Props {
}
export class Profile extends React.Component<Props, State> {
public state: State;
public props: Props;
constructor(props){
super(props);
this.state = {
name: 'baz111'
};
}
public render() {
return (
<section>
<section>
<h3>profile 1</h3>
<div>baz</div>
</section>
<section>
<h3>profile 2</h3>
<div>{this.state.name}</div>
</section>
</section>
)
}
}