loading...

re: 5 Uses for the Spread Operator VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I am using it in the React environment quite often and I'm curious if you have a clue about how the performance is compared to the equal methods li...
 

It depends on the JS engine running, i.e. chrome vs safari. My understanding is that slice used to be more performant but that gap has been cut significantly and on many browsers, the spread operator is the same, or possibly better performance wise.

And since slice() only works for arrays, the spread operator is a more powerful piece of syntax.

 

Thanks for the answer, wasn't aware of it but a quick research confirmed it :)

Code of Conduct Report abuse