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

Bug: Exhaustive deps lint rule mistakingly flags an assignment #19312

Closed
gaearon opened this issue Jul 10, 2020 · 0 comments · Fixed by #19313
Closed

Bug: Exhaustive deps lint rule mistakingly flags an assignment #19312

gaearon opened this issue Jul 10, 2020 · 0 comments · Fixed by #19313

Comments

@gaearon
Copy link
Collaborator

gaearon commented Jul 10, 2020

Example:

        function Example(props) {
          useEffect(() => {
            let topHeight = 0;
            topHeight = props.upperViewHeight;
          }, [props.upperViewHeight]);
        }

This is not supposed to violate because props.upperViewHeight is in the deps.

@gaearon gaearon added Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Component: ESLint Rules Type: Bug and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant