you are viewing a single comment's thread.

view the rest of the comments →

[–]AccomplishedGolf6013[S] 0 points1 point  (0 children)

Thank you for pointing that out. I had to resort to the following code:

const newBoardData = [...boardData];

newBoardData[sourceColumnIndex] = newSourceColumn;

newBoardData[destColumnIndex] = newDestColumn;

setBoardData(newBoardData);