I'm just getting an eslint error about destructuring this code, but I have no idea how it should look. In this instance, I will probably just ignore this warning as this code is already pretty succinct, but, I am curious how it would be destructured. Any ideas or guidance is appreciated.
_onChange = (e, key) => {
const edited = { ...this.state[key] }; <--- this line is throwing the eslint error
edited[e.name] = e.value;
this.setState({
[key]: edited,
});
};