Echo JS 0.11.0

<~>
MaxArt 2756 days ago. link 1 point
Actually the object spread operator is part of ESNext, so no need to bring JSX up. And it's *so* much better than Object.assign to create immutable objects.
Basically,

    const foo = { ...bar };

is equivalent to

    const foo = Object.assign({}, bar);

but the former is more compact and readable than the latter.

Replies