jsx-eslint/eslint-plugin-react
在 GitHub 查看Some cases should not be triggered **no-unused-state**
Open
#1,626 建立於 2017年12月25日
enhancementhelp wanted
倉庫指標
- Star
- (8,630 star)
- PR 合併指標
- (30 天內沒有已合併 PR)
描述
no-unused-state
state = {
id: null,
name: '',
age: 0,
}
const {
id,
...data
} = this.state;
console.log('data', data);
name and age should not be reported as error [eslint] Unused state field: 'departmentId' (react/no-unused-state).