-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
[eslint-plugin-react-hooks] false positive with useFocusEffect #18888
Comments
Sigh. People have been asking for the opposite, so we added this for every function ending with |
Admittedly, |
😢 I completely understand it. But it's difficult to ask all library authors to follow the same rules. Maybe adding an option would help. |
Options just cause further fragmentation. I think ideally we'd reserve Effect suffix for things that mirror the dependency API. And then e.g. react navigation could use |
Sounds reasonable to me.
Would be great if this could be added to documentation. I would file an issue to |
It is very nice indeed that you're implementing features people were asking for, but it's really worth to describe those features in the changelog at least (because not everyone is aware what others were asking for). |
@surgeboris When I added this changelog, I took twenty minutes to go through all the past PRs, remember the context behind them, and reconstruct it. I'm sorry that I missed one of them. |
Fixed changelog: 14e554b. I think we'll need to ask |
We're going to revert this heuristic, so no changes necessary to React Navigation. |
Removed in |
@gaearon thanks! |
Upgraded
eslint-plugin-react-hooks
to 4.0.0, it's showing errors on React-Navigation'suseFocusEffect
hook.(example copied from
React-Navigation
documentation)The current behavior
Lint error:
The expected behavior
The rules shouldn't check the function because it's not a React
useEffect
hook.The text was updated successfully, but these errors were encountered: