DEV Community

Discussion on: Array.filter() Is Awesome

Collapse
 
falco467 profile image
falco467

Why are you calling setList like that? The array is new and not used anywhere else, no need to copy it again!?

Collapse
 
bbarbour profile image
Brian Barbour

setList is the useState hook. That's why.

Collapse
 
vadimsolovei profile image
Vadim Solovei

Sorry, but can you explain in more detail?