Skip to content

Bug: [eslint-plugin-exhaustive-deps] can't find unstable value. #24268

@geewoo94

Description

@geewoo94

React version: 18.0.0 (not important)

Steps To Reproduce

I'll show as a code.
스크린샷 2022-04-04 오전 12 01 05

Link to code example:
https://codesandbox.io/s/stupefied-raman-g6j3fi?file=/src/App.js

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions