Skip to content

Fix 'yarn lint' issue for targetListeners#2238

Closed
DavidRieman wants to merge 1 commit intonecolas:masterfrom
DavidRieman:drieman/fixYarnLintTargetListeners
Closed

Fix 'yarn lint' issue for targetListeners#2238
DavidRieman wants to merge 1 commit intonecolas:masterfrom
DavidRieman:drieman/fixYarnLintTargetListeners

Conversation

@DavidRieman
Copy link
Contributor

Cloning a fresh react-native-web repository produces the following warning output when running yarn lint:

58:6  warning  React Hook useLayoutEffect has a missing dependency: 'targetListeners'.
 Either include it or remove the dependency array  react-hooks/exhaustive-deps.

Options would be to disable the linter on that line (as it should have no impact being a wrapped useRef) or to just add it to silence it. Took the latter approach as that way is consistent with the precedent set by useResponderEvents\index.js.

58:6  warning  React Hook useLayoutEffect has a missing dependency: 'targetListeners'. Either include it or remove the dependency array  react-hooks/exhaustive-deps.

Options would be to disable the linter on that line (as it should have no impact being a wrapped useRef) or to just add it to silence it.  Took the latter approach as that way is consistent with the precedent set by `useResponderEvents\index.js`.
@necolas necolas closed this in c0e3409 Mar 1, 2022
rnike pushed a commit to VeryBuy/react-native-web that referenced this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant