trachanh1609 / theshortcut

0 stars 0 forks source link

Converting Array to Object in App.js line 59 #2

Closed ArmandDu closed 5 years ago

ArmandDu commented 5 years ago
const initState = {
  player: true,
  board: [ '', '', '', '', '', '',  '', '', ''],
  winner: null,
}
//....
let newBoard = {...this.state.board} ; //<-- line 59

It seems like you are converting an Array into an Object. should be

let newBoard = [...this.state.board] ; //<-- line 59
trachanh1609 commented 5 years ago

ohh yes, you are right. My bad

trachanh1609 commented 5 years ago

Fixed