Skip to content

Commit

Permalink
Update prefer-stateless-function documentation
Browse files Browse the repository at this point in the history
show context in pure component for clarity
  • Loading branch information
yannickcr authored Jan 14, 2017
2 parents 70d48a8 + 30af256 commit 5efd392
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/rules/prefer-stateless-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ var Hello = React.createClass({
The following pattern is not considered a warning:

```jsx
const Foo = function(props) {
const Foo = function(props, context) {
const {
location
} = context.router;

return <div>{props.foo}</div>;
};
```
Expand Down

0 comments on commit 5efd392

Please sign in to comment.