Default property value in React component using TypeScript

Default props with class component Using static defaultProps is correct. You should also be using interfaces, not classes, for the props and state. Update 2018/12/1: TypeScript has improved the type-checking related to defaultProps over time. Read on for latest and greatest usage down to older usages and issues. For TypeScript 3.0 and up TypeScript specifically … Read more