I am learning react native
and ES6
. I read many documents but sometimes get confused with the code. for instance, here:
return (
<View {...this.panResponder.panHandlers}>
{this.renderCards()}
</View>
);
I know that ...
is gonna open the object and spread it as the View
props, but why do we need to wrap with {}
?