I am trying to modify the Tic Tac Toe tutorial(https://codepen.io/gaearon/pen/ybbQJX?editors=0010).
Instead of null, I want to pass 9 different images and its title to the initial squares.
After clicking, the images will turn into different ones.
Tic Tac Toe: empty boxes ----> show X after the click
My version: images(old) & title ------> show different image(new) after the click(A1-old to A1-new, A2-old to A2-new)
class Board extends React.Component {
constructor(props) {
super(props);
this.state = {
squares: [
{ title: "A1", image: require('../img/A1-old.png') },
{ title: "A2", image: require('../img/A2-old.png') },
]
};
}
Then I am stuck at the first step, showing images..........