Skip to content

Commit

Permalink
List bad example first to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinweber committed Aug 27, 2018
1 parent 685f37b commit ced1cb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,16 @@ This style guide is mostly based on the standards that are currently prevalent i
Filter out unnecessary props when possible. Also, use [prop-types-exact](https://www.npmjs.com/package/prop-types-exact) to help prevent bugs.

```jsx
// good
// bad
render() {
const { irrelevantProp, ...relevantProps } = this.props;
return <WrappedComponent {...relevantProps} />
return <WrappedComponent {...this.props} />
}
// bad
// good
render() {
const { irrelevantProp, ...relevantProps } = this.props;
return <WrappedComponent {...this.props} />
return <WrappedComponent {...relevantProps} />
}
```

Expand Down

0 comments on commit ced1cb3

Please sign in to comment.