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
supercrytoking authored Apr 8, 2019
2 parents caa8792 + 39beec5 commit 9b391e9
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 9b391e9

Please sign in to comment.