three dot at the end of functionjs code example
Example: 3 dots to get all object properties in JS
this.setState(prevState => {
return {foo: {...prevState.foo, a: "updated"}};
});
this.setState(prevState => {
return {foo: {...prevState.foo, a: "updated"}};
});