You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/destructuring-assignment.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ class Foo extends React.PureComponent {
107
107
108
108
### `destructAtParameter` (default: "ignore")
109
109
110
-
This option can be one of `always` or `ignore`. When configured with `always`, the rule will require props destructuring happens at function parameter.
110
+
This option can be one of `always` or `ignore`. When configured with `always`, the rule will require props destructuring happens in the function signature.
111
111
112
112
Examples of **incorrect** code for `destructAtParameter: 'always'` :
113
113
@@ -130,7 +130,7 @@ function Foo({a}) {
130
130
// Ignores when props is used elsewhere
131
131
functionFoo(props) {
132
132
const {a} = props;
133
-
useProps(props);
133
+
useProps(props);// NOTE: it is a bad practice to pass the props object anywhere else!
0 commit comments