0

Instead of writing this:

<FilterBar filters={filters} setFilters={setFilters} />

I like to write this when the props and the variables are the same name as a shorthand.

<FilterBar {...{ filters, setFilters }} />

Is there any downside to doing this performance-wise?

RobKohr
  • 6,611
  • 7
  • 48
  • 69
  • Does this answer your question? [Does spread operator affect performance?](https://stackoverflow.com/questions/55843097/does-spread-operator-affect-performance) – 0stone0 Sep 15 '22 at 16:35
  • *"But, on modern computers, and on modern JS engines, the processing power required is next to nothing; what does it matter, when millions of instructions can be processed each second? A handful of key-value pairs is nothing to worry about."* – 0stone0 Sep 15 '22 at 16:35

0 Answers0