File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
packages/eslint-plugin-react-hooks/src Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -222,18 +222,15 @@ export default {
222
222
}
223
223
const id = def . node . id ;
224
224
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
- }
234
225
if ( name === 'useRef' && id . type === 'Identifier' ) {
235
226
// useRef() return value is stable.
236
227
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 ;
237
234
} else if ( name === 'useState' || name === 'useReducer' ) {
238
235
// Only consider second value in initializing tuple stable.
239
236
if (
You can’t perform that action at this time.
0 commit comments