What does the ... do in this React (using JSX) code and what is it called?
The ...(spread operator) is used in react to:
provide a neat way to pass props from parent to child components. e.g given these props in a parent component,
this.props = {
username: "danM",
email: "dan@mail.com"
}
they could be passed in the following manner to the child,
which is similar to this
but way cleaner.