What are these three dots in React doing?
@lebyy▲ 0 net votes
Problem: What does the ... do in this React (using JSX) code and what is it called? <Modal {...this.props} title='Modal heading' animation={false}> Fix (from the top answer): 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"…