Is it correct to destruct props from an object and immediately return it like this:
const mapStateToProps = state => ({
...{ name, phone, shift} = state.employeeForm
});
Works pretty fine but my IDE is going mad. Any advice?
Is it correct to destruct props from an object and immediately return it like this:
const mapStateToProps = state => ({
...{ name, phone, shift} = state.employeeForm
});
Works pretty fine but my IDE is going mad. Any advice?