我在一个包装上看到这段代码:
const SortableList = SortableContainer(({items}) => {
return (
<ul>
{items.map((value, index) =>
<SortableItem key={`item-${index}`} index={index} value={value} />
)}
</ul>
);
});
在函数参数中加上花括号,对items
发生了什么?
( <ul>
部分。 - Kevin B