Skip to content

Commit 5efd392

Browse files
authored
Update prefer-stateless-function documentation
show context in pure component for clarity
2 parents 70d48a8 + 30af256 commit 5efd392

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/rules/prefer-stateless-function.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ var Hello = React.createClass({
2727
The following pattern is not considered a warning:
2828

2929
```jsx
30-
const Foo = function(props) {
30+
const Foo = function(props, context) {
31+
const {
32+
location
33+
} = context.router;
34+
3135
return <div>{props.foo}</div>;
3236
};
3337
```

0 commit comments

Comments
 (0)