What does ...rest mean in javscript?

in a part of react project

render() {
        const {
        } = this.props;
        const cx = classNames({
          'form-horizontal': horizontal,
        }, className);
        return (
          <form className={cx} {..rest}>

    const Field = ({ children, ..rest }) => (
      <div className="form-group">

Watch this video https://youtu.be/j2DMwUYEC88

1 Like

I just begin learning js and you helped me discover a new shiny thing called ES6! I couldn’t even find this in “advanced” section of MDN. You are so helpful. Thank you xD


1 Like