Closed dfdgsdfg closed 2 years ago
Is there any natural way or practice to use fields for refactoring constructor arguments with object destructuring?
I mean, not kind of tricky way.
class Animal { constructor({name, age}) { this.name = name this.age = age } }
Oh.. It's my mistake. I have to bind it in constructor.
Thanks. : )
Is there any natural way or practice to use fields for refactoring constructor arguments with object destructuring?
I mean, not kind of tricky way.
legacy code