teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

追記

2018/07/11 06:39

投稿

cheche0830
cheche0830

スコア187

title CHANGED
File without changes
body CHANGED
@@ -13,15 +13,15 @@
13
13
 
14
14
  click() {
15
15
  console.log(33);
16
- this.test;//ここがエラー
16
+ this.test;
17
17
  }
18
18
  test() {
19
- console.log(33333333);
19
+ console.log(33333333);//ここ無反応
20
20
  }
21
21
 
22
22
  render() {
23
23
  return (
24
- <h1 onClick={this.click}>Hello World</h1>
24
+ <h1 onClick={this.click.bind(this)}>Hello World</h1>
25
25
  )
26
26
  }
27
27
  }