<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 18.0.0 (not important) ## Steps To Reproduce I'll show as a code. <img width="593" alt="스크린샷 2022-04-04 오전 12 01 05" src="https://user-images.githubusercontent.com/65149763/161434194-868b7fbb-9571-40d8-a4e3-2b261506d9ac.png"> Link to code example: https://codesandbox.io/s/stupefied-raman-g6j3fi?file=/src/App.js <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior exhaustive-deps can't found unstable dependency. ## The expected behavior Warn lint message. ## Opinion I know this code is super weird but This code may be improved. something like - Add more core lint rule like 'useState is always declared as a const' - eslint-plugin-exhaustive-deps should find reallocation value. and calculate real value. - Or just stay it. I just wonder what is your opinion. thank you.
Activity
gaearon commentedon Apr 3, 2022
Interesting find. If the binding is ever reassigned we should treat it as unstable.