Skip to content

Commit 777fa9c

Browse files
committed
Maybe the experimental flag isn't worth it
1 parent 1fae1ad commit 777fa9c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,15 @@ export default {
222222
}
223223
const id = def.node.id;
224224
const {name} = callee;
225-
if (__EXPERIMENTAL__) {
226-
if (
227-
(name === 'experimental_useEvent' || name === 'useEvent') &&
228-
id.type === 'Identifier'
229-
) {
230-
// useEvent() return value is stable.
231-
return true;
232-
}
233-
}
234225
if (name === 'useRef' && id.type === 'Identifier') {
235226
// useRef() return value is stable.
236227
return true;
228+
} else if (
229+
(name === 'experimental_useEvent' || name === 'useEvent') &&
230+
id.type === 'Identifier'
231+
) {
232+
// useEvent() return value is stable.
233+
return true;
237234
} else if (name === 'useState' || name === 'useReducer') {
238235
// Only consider second value in initializing tuple stable.
239236
if (

0 commit comments

Comments
 (0)