xxxxxxxxxx
let numberStore = [0, 1, 2];
let newNumber = 12;
numberStore = [numberStore, newNumber];
xxxxxxxxxx
{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
<Modal {this.state} title='Modal heading'>
would be the same as
<Modal a={this.state.a} b={this.state.b} title='Modal heading'>
xxxxxxxxxx
const userCredentials = { firstname: 'Robin' };
const userDetails = { nationality: 'German' };
const user = {
userCredentials,
userDetails,
};
console.log(user);
// output: { firstname: 'Robin', nationality: 'German' }