react spread operator code example
Example 1: react spread operator
let numberStore = [0, 1, 2];
let newNumber = 12;
numberStore = [...numberStore, newNumber];
Example 2: spread operator javascript
[a, b, ...objIteravel] = [1, 2, 3, 4, 5];
Example 3: spread operator react
{...this.state} spreads out the "own" enumerable properties in
props as discrete properties on the Modal element you're creating.
For instance, if this.props contained a: 1 and b: 2, then
would be the same as