質問編集履歴

2

修正

2019/09/22 09:15

投稿

hello_whats_up
hello_whats_up

スコア57

test CHANGED
File without changes
test CHANGED
@@ -38,7 +38,7 @@
38
38
 
39
39
 
40
40
 
41
- changeName(e) {
41
+ changeName = (e) => {
42
42
 
43
43
  this.setState({
44
44
 
@@ -50,7 +50,7 @@
50
50
 
51
51
 
52
52
 
53
- changeEmail(e){
53
+ changeEmail = (e) => {
54
54
 
55
55
  this.setState({
56
56
 
@@ -62,7 +62,7 @@
62
62
 
63
63
 
64
64
 
65
- changePassword(e){
65
+ changePassword = (e) => {
66
66
 
67
67
  this.setState({
68
68
 

1

修正

2019/09/22 09:15

投稿

hello_whats_up
hello_whats_up

スコア57

test CHANGED
File without changes
test CHANGED
@@ -38,13 +38,33 @@
38
38
 
39
39
 
40
40
 
41
- changeData(e) {
41
+ changeName(e) {
42
42
 
43
43
  this.setState({
44
44
 
45
- name: e.target.value,
45
+ name: e.target.value
46
46
 
47
+ })
48
+
49
+ }
50
+
51
+
52
+
53
+ changeEmail(e){
54
+
55
+ this.setState({
56
+
47
-        email: e.target.value,
57
+ email: e.target.value
58
+
59
+ })
60
+
61
+ }
62
+
63
+
64
+
65
+ changePassword(e){
66
+
67
+ this.setState({
48
68
 
49
69
  password: e.target.value
50
70
 
@@ -68,15 +88,15 @@
68
88
 
69
89
  <label>名前</label>
70
90
 
71
- <input type="text" name="name" value={this.state.name_sei} onChange={this.changeData}/>
91
+ <input type="text" name="name" value={this.state.name} onChange={this.changeName}/>
72
92
 
73
93
  <label>メールアドレス</label>
74
94
 
75
- <input type="email" name="email" value={this.state.email} onChange={this.changeData}/>
95
+ <input type="email" name="email" value={this.state.email} onChange={this.changeEmail}/>
76
96
 
77
97
  <label>パスワード</label>
78
98
 
79
- <input type="text" name="password" value={this.state.password} onChange={this.changeData}/>
99
+ <input type="text" name="password" value={this.state.password} onChange={this.changePassword}/>
80
100
 
81
101
  </div>
82
102