Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
6 replies
Machina0

question about spread operator in react

Can someone explain why I need to use the spread (...) operator when giving each post to PostCard, but i can't use it when just console logging it?

Also, if PostCard only takes 1 argument: post, why can't i just pass the entire post to PostCard, why do i need to do ...post?

thanks
image.png
image.png
Was this page helpful?