13
sto leggendo an example of the React-dnd project:
moveCard(dragIndex, hoverIndex) {
const { cards } = this.state;
const dragCard = cards[dragIndex];
this.setState(update(this.state, {
cards: {
$splice: [
[dragIndex, 1],
[hoverIndex, 0, dragCard]
]
}
}));}
E 'questo $ giunzione lo stesso ha spiegato on this page?
Qualcuno potrebbe spiegare cosa fa questo pezzo di codice? La funzione $splice
mi confonde molto.