Skip to content

Commit 151cb76

Browse files
committed
Correct stateless function in prop-types examples
1 parent c392099 commit 151cb76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/rules/prop-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var Hello = React.createClass({
2525
});
2626

2727
function Hello({ name }) {
28-
return <div>Hello {this.props.name}</div>;
28+
return <div>Hello {name}</div>;
2929
}
3030
```
3131

@@ -56,7 +56,7 @@ var Hello = React.createClass({
5656
});
5757

5858
function Hello({ name }) {
59-
return <div>Hello {this.props.name}</div>;
59+
return <div>Hello {name}</div>;
6060
}
6161
Hello.propTypes = {
6262
name: React.PropTypes.string.isRequired,

0 commit comments

Comments
 (0)