I'm a frontend developer, with a passion for clean and efficient code. I'm using mostly JavaScript, TypeScript, React & CSS. I'm always trying to grow as a developer by learning new technologies.
Nice π this is an amazing and very useful feature. Another useful thing with object destructing is to destruct some properties and then use the spread operator to get the rest.
In Object Destructuring, these three dots is rest propertises,
Rest in Object Destructuring
The Rest/Spread Properties for ECMAScript proposal (stage 4) adds the rest syntax to destructuring. Rest properties collect the remaining own enumerable property keys that are not already picked off by the destructuring pattern.
Nice π this is an amazing and very useful feature. Another useful thing with object destructing is to destruct some properties and then use the spread operator to get the rest.
Awesome Daniel, Thanks for adding to the list. Have a great day.
Since it is ..., it's not sread operator.
In Object Destructuring, these three dots is rest propertises,
Rest in Object Destructuring
The Rest/Spread Properties for ECMAScript proposal (stage 4) adds the rest syntax to destructuring. Rest properties collect the remaining own enumerable property keys that are not already picked off by the destructuring pattern.