We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15c5b0b commit 3533595Copy full SHA for 3533595
src/components/Game.js
@@ -10,19 +10,28 @@ export default class Game extends React.Component {
10
history: [
11
{squares: Array(9).fill(null)}
12
],
13
+ value: 5
14
}
15
16
17
+ changeState = () => {
18
+ this.setState({
19
+ value: 6
20
+ })
21
+ }
22
+
23
someFunction = () => {
24
return 5
25
26
27
render() {
28
+ console.log(this.state)
29
const result = this.someFunction()
30
return(
31
<div className= "game">
32
<div className = "game-board">
33
<Board value = {result}/>
34
+ <button onClick = {() => this.changeState()}>Click Me!</button>
35
</div>
36
37
)
0 commit comments