I can\'t figure out how to set default property values for my components using Typescript.
This is the source code:
class PageState { } export class
With Typescript 2.1+, use Partial < T > instead of making your interface properties optional.
export interface Props { obj: Model, a: boolean b: boolean } public static defaultProps: Partial<Props> = { a: true };