-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
@wbinnssmith The following code:
_handleUpdate = (stateName, active) => {
this.setState({[stateName]: active});
};
Gives out an Unused state field: 'stateName'
error from the no-unused-state
rule.
I think it's probably best to have no-unused-state
rule ignore dynamic object keys since it will be too difficult to detect whether or not they're really being used. But at the very least, it shouldn't use the variable name as the key to look for.