Could anyone show an example of defining defaultProps
on a React component class in TypeScript?
interface IProps {}
interface IState {}
class SomeComponent extends Component<IProps, IState> {
// ... defaultProps ?
// public defaultProps: IProps = {}; // This statement produces an error
constructor(props: IProps) {
super(props);
}
// ...
}