Skip to content

no-unused-state warning when state only use in setState #1964

Closed
@tarol

Description

@tarol

if setState was written like this

setState(state => ({
b: state.a + 1
}))

state.a has not used anywhere, no-unused-state will report error

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