Is there any utility similar to the spread operato...
# react
s
Is there any utility similar to the spread operator in react ? ie. its would be really nice not to manually forward every single listener such as this:
Copy code
return (
    <button {...listeners}>
      {props.children}
    </button>
  );
Seems I can use
Object.assign(this, listeners)
for this purpose instead.
t
For props you can use unary plus
Copy code
button {
   +otherProps

   +props.children
}
s
Good to know. Thanks!