Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'yarn lint' issue for targetListeners #2238

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