That is not ES6 but has only been added in ECMAScript 2018.

It is called "Object Rest/Spread Properties" and is part of the Spread Syntax.

Answer from str on Stack Overflow
🌐
freeCodeCamp
freecodecamp.org › news › three-dots-operator-in-javascript
... in JavaScript – the Three Dots Operator in JS
November 7, 2024 - The three dots operator in JavaScript is one of the significant updates that was shipped with ES6. This operator (...) helps you achieve many things that previously required many lines of code, unfamiliar syntax, and more. In this short article, you ...
🌐
Medium
oprearocks.medium.com › what-do-the-three-dots-mean-in-javascript-bc5749439c9a
What do the three dots (…) mean in JavaScript? | by Adrian Oprea | Medium
August 27, 2018 - When used within the signature of a function, where the function’s arguments should be, either replacing the arguments completely or alongside the function’s arguments, the three dots are also called the rest operator.
Discussions

What do the three dots (...) mean in JavaScript?
I feel like that article should talk about using the spread operator to deal with immutable array / object operations, e.g., for Redux in a reducer: return { ...state, field: { ...state.field, subField3: newValue } }; More on reddit.com
🌐 r/javascript
14
1
August 24, 2018
What are these three dots in React doing? - javascript
There's another use for the three dots which is known as Rest Parameters and it makes it possible to take all of the arguments to a function in as one array. ... The context of his example is json conversion only, not array conversion. 2020-06-30T20:24:37.35Z+00:00 ... That's an awesome answer, and as a Python Developer I can translate the spread operator ... More on stackoverflow.com
🌐 stackoverflow.com
What do the three dots (...) mean in JavaScript?
That is the spread operator. Basically, it's a shorthand you can use to pass an array to something (usually a function) that should iterate over that array. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax More on reddit.com
🌐 r/webdev
2
1
August 24, 2018
Rest and Spread operator: Three dots that changed JavaScript

I wouldn't recommend naming the function parameter of a reduce previous.

function sum(...args) {
return args.reduce((previous, current)=> {
return previous + current;
});
}

The first parameter is the accumulator. total or previousTotal or anything that suggests that we're building on it may be better.

previous suggests that we're comparing to the previous item in the array, and examples that use it can make reduce functions even more complicated to understand than they need to be.

More on reddit.com
🌐 r/learnjavascript
4
98
August 18, 2020
🌐
CoreUI
coreui.io › blog › what-are-the-three-dots-in-javascript-do
What are the three dots <code>...</code> in JavaScript do? · CoreUI
September 3, 2024 - In JavaScript, the three dots operator (...) is a versatile feature introduced in ES6. Known as the spread operator and rest parameter, these three dots have transformed how developers handle arrays, objects, and function parameters.
🌐
Built In
builtin.com › articles › three-dots-in-javascript
What Are the Three Dots (...) in JavaScript | Built In
December 13, 2023 - The three dots (...) in JavaScript is known as the spread operator, and it’s used to make shallow copies of JavaScript objects.
🌐
DEV Community
dev.to › sagar › three-dots---in-javascript-26ci
JavaScript Ellipsis: Three dots ( … ) in JavaScript - DEV Community
September 21, 2020 - When three dots (…) occurs in a function call or alike, it's called a "spread operator" and expands an array into a list.
🌐
Reddit
reddit.com › r/javascript › what do the three dots (...) mean in javascript?
r/javascript on Reddit: What do the three dots (...) mean in JavaScript?
August 24, 2018 - When used within the signature of a function, where the function’s arguments should be, either replacing the arguments completely or alongside the function’s arguments, the three dots are also called the rest operator...
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › what-are-these-triple-dots-in-javascript
What are these triple dots (...) in JavaScript ? - GeeksforGeeks
August 5, 2025 - To overcome this problem we used the triple dots format/spread operator. As the spread operator returns a list of objects it is accepted by the method and the minimum element of the array is returned.
🌐
GeeksforGeeks
geeksforgeeks.org › what-are-these-triple-dots-in-javascript
What are these triple dots (…) in JavaScript ? | GeeksforGeeks
December 15, 2023 - The triple dots are known as the spread operator, which takes an iterable(array, string, or object) and expands the iterable to individual values.
🌐
Fjolt
fjolt.com › article › javascript-three-dots-spread-operator
What are the three dots (...) or spread operator in Javascript?
The spread operator, spread syntax or 3 dots (...), is a type of syntax in Javascript which is used by both function calls and in arrays/objects.
🌐
Codingem
codingem.com › home › javascript three dots (…) operator made easy (with examples)
JavaScript Three Dots (...) Operator Made Easy (with Examples)
July 10, 2025 - In JavaScript, you can use the three dots (...) operator to spread iterable values. You can also use it to capture the rest of the values.
🌐
Academic Help
academichelp.net › coding › javascript › what-three-dots-mean.html
What Does '. . .' Mean in Javascript: Three Dots JS Guide
June 30, 2023 - In JavaScript, the three dots ... is a versatile operator known as the Three Dots Operator. It has two distinct functions – the Spread Operator and the Rest Operator.
🌐
Technical Feeder
technicalfeeder.com › 2021 › 07 › spread-operator-three-dots-in-javascript-typescript
TypeScript/JavaScript Spread operator (three dots) | Technical Feeder
October 26, 2022 - The spread operator (three dots) is used to copy an array and expand an array to pass the values to another object or function parameters. It can also be used as rest parameters in a function to indicate that the function can take as many arguments ...
Top answer
1 of 16
1637

That's property spread notation. It was added in ES2018 (spread for arrays/iterables was earlier, ES2015), but it's been supported in React projects for a long time via transpilation (as "JSX spread attributes" even though you could do it elsewhere, too, not just attributes).

{...this.props} 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.props} title='Modal heading' animation={false}>

would be the same as

<Modal a={this.props.a} b={this.props.b} title='Modal heading' animation={false}>

But it's dynamic, so whatever "own" properties are in props are included.

Since children is an "own" property in props, spread will include it. So if the component where this appears had child elements, they'll be passed on to Modal. Putting child elements between the opening tag and closing tags is just syntactic sugar — the good kind — for putting a children property in the opening tag. Example:

Show code snippet

class Example extends React.Component {
  render() {
    const { className, children } = this.props;
    return (
      <div className={className}>
      {children}
      </div>
    );
  }
}
ReactDOM.render(
  [
    <Example className="first">
      <span>Child in first</span>
    </Example>,
    <Example className="second" children={<span>Child in second</span>} />
  ],
  document.getElementById("root")
);
.first {
  color: green;
}
.second {
  color: blue;
}
<div id="root"></div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
Run code snippetEdit code snippet Hide Results Copy to answer Expand

Spread notation is handy not only for that use case, but for creating a new object with most (or all) of the properties of an existing object — which comes up a lot when you're updating state, since you can't modify state directly:

this.setState(prevState => {
    return {foo: {...prevState.foo, a: "updated"}};
});

That replaces this.state.foo with a new object with all the same properties as foo except the a property, which becomes "updated":

Show code snippet

const obj = {
  foo: {
    a: 1,
    b: 2,
    c: 3
  }
};
console.log("original", obj.foo);
// Creates a NEW object and assigns it to `obj.foo`
obj.foo = {...obj.foo, a: "updated"};
console.log("updated", obj.foo);
.as-console-wrapper {
  max-height: 100% !important;
}
Run code snippetEdit code snippet Hide Results Copy to answer Expand

2 of 16
547

... are called spread attributes which, as the name represents, it allows an expression to be expanded.

var parts = ['two', 'three'];
var numbers = ['one', ...parts, 'four', 'five']; // ["one", "two", "three", "four", "five"]

And in this case (I'm going to simplify it).

// Just assume we have an object like this:
var person= {
    name: 'Alex',
    age: 35 
}

This:

<Modal {...person} title='Modal heading' animation={false} />

is equal to

<Modal name={person.name} age={person.age} title='Modal heading' animation={false} />

So in short, it's a neat short-cut, we can say.

🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-ellipsis
JavaScript Ellipsis - GeeksforGeeks
July 23, 2025 - JavaScript Ellipsis (also known as the spread/rest operator) is represented by three dots (...). It is used for various tasks, such as spreading elements of an array into individual values or collecting multiple values into an array or object.
🌐
DEV Community
dev.to › sonicoder › the-tale-of-three-dots-in-javascript-4287
The tale of three dots in Javascript - DEV Community
February 25, 2024 - The three consecutive dots have two meanings: the spread operator and the rest operator.
🌐
HackerNoon
hackernoon.com › decoding-the-three-dots-or-spread-operator-in-javascript
Decoding the Three Dots (…) Or Spread Operator in Javascript | HackerNoon
September 4, 2022 - The spread operator, spread syntax or 3 dots (...), is a type of syntax in Javascript that is used by both function calls and arrays/objects.
🌐
Appsmith
community.appsmith.com › content › guide › javascript-spread-operator-what-are-those-three-dots-my-code
The Javascript Spread Operator - What Are Those Three Dots in My Code? | Appsmith Community Portal
August 29, 2023 - This versatile tool simplifies array and object manipulation, enabling developers to write cleaner, more efficient code. In this article, we'll delve into the spread operator, exploring what it is, how to use it, its best applications, as well ...
🌐
Sentry
sentry.io › sentry answers › react › what do these three dots `...` in react do?
What Do These Three Dots `...` in React Do? | Sentry
October 21, 2022 - You may have come across JSX code in React like this snippet: ... And wondered what these three dots ... are and what they do. These three dots are called the spread syntax or spread operator.
🌐
Oprea
oprea.rocks › blog › what-do-the-three-dots-mean-in-javascript.html
Adrian OPREA | Remote Full Stack Software Engineer | What do the three dots (...) mean in JavaScript?
August 22, 2018 - When used within the signature of a function, where the function’s arguments should be, either replacing the arguments completely or alongside the function’s arguments, the three dots are also called the rest operator.