Skip to content

Commit

Permalink
Merge pull request #103 from VanTanev/improve-default-props-example
Browse files Browse the repository at this point in the history
[Basic] Improve the class component defaultProps example
  • Loading branch information
coopfeathy committed Apr 8, 2019
2 parents 4222a11 + 69aad48 commit c15d81d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export class Greet extends React.Component<Props> {
const { name } = this.props;
return <div>Hello ${name.toUpperCase()}!</div>;
}
static defaultProps = { name: 'world' };
static defaultProps: Partial<Props> = { name: 'world' };
}

// Type-checks! No type assertions needed!
Expand Down

0 comments on commit c15d81d

Please sign in to comment.