Here is the modified version of react tic-tac-toe , CodePen Here
I've added time to the move description (only to see when li was rendered):
<li key={move}> <button onClick={() => this.jumpTo(move)}>{desc + ' ' + +new Date()}</button> </li> Expected result: each list item has different time, since li's have key's they don't get re-rendered on each move.
What really happens: each time a move is made time on each li changes (each li is rendered). Go to game start 1512330036500 Go to move #1 1512330036500 Go to move #2 1512330036500 Go to move #3 1512330036500 Go to move #4 1512330036500 Go to move #5 1512330036500
What's wrong with my understanding of how it should behave?
Is there a way to make it work as I expect it to?
moveaskeysince it just equates to the index.