Skip to content

Commit aeee123

Browse files
committed
change all instances of "value.value"
1 parent 3e6acb2 commit aeee123

File tree

18 files changed

+54
-54
lines changed

18 files changed

+54
-54
lines changed

stepped-solutions/13/components/StorePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88
// 1. Stop the form from submitting
99
event.preventDefault();
1010
// 2. get the text from that input
11-
const storeName = this.myInput.value.value;
11+
const storeName = this.myInput.current.value;
1212
// 3. Change the page to /store/whatever-they-entered
1313
this.props.history.push(`/store/${storeName}`);
1414
};

stepped-solutions/14/components/AddFishForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111
// 1. stop the form from submitting
1212
event.preventDefault();
1313
const fish = {
14-
name: this.nameRef.value.value,
15-
price: parseFloat(this.priceRef.value.value),
16-
status: this.statusRef.value.value,
17-
desc: this.descRef.value.value,
18-
image: this.imageRef.value.value
14+
name: this.nameRef.current.value,
15+
price: parseFloat(this.priceRef.current.value),
16+
status: this.statusRef.current.value,
17+
desc: this.descRef.current.value,
18+
image: this.imageRef.current.value
1919
};
2020
this.props.addFish(fish);
2121
// refresh the form

stepped-solutions/14/components/StorePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88
// 1. Stop the form from submitting
99
event.preventDefault();
1010
// 2. get the text from that input
11-
const storeName = this.myInput.value.value;
11+
const storeName = this.myInput.current.value;
1212
// 3. Change the page to /store/whatever-they-entered
1313
this.props.history.push(`/store/${storeName}`);
1414
};

stepped-solutions/18/components/AddFishForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111
// 1. stop the form from submitting
1212
event.preventDefault();
1313
const fish = {
14-
name: this.nameRef.value.value,
15-
price: parseFloat(this.priceRef.value.value),
16-
status: this.statusRef.value.value,
17-
desc: this.descRef.value.value,
18-
image: this.imageRef.value.value
14+
name: this.nameRef.current.value,
15+
price: parseFloat(this.priceRef.current.value),
16+
status: this.statusRef.current.value,
17+
desc: this.descRef.current.value,
18+
image: this.imageRef.current.value
1919
};
2020
this.props.addFish(fish);
2121
// refresh the form

stepped-solutions/18/components/StorePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88
// 1. Stop the form from submitting
99
event.preventDefault();
1010
// 2. get the text from that input
11-
const storeName = this.myInput.value.value;
11+
const storeName = this.myInput.current.value;
1212
// 3. Change the page to /store/whatever-they-entered
1313
this.props.history.push(`/store/${storeName}`);
1414
};

stepped-solutions/19/src/components/AddFishForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111
// 1. stop the form from submitting
1212
event.preventDefault();
1313
const fish = {
14-
name: this.nameRef.value.value,
15-
price: parseFloat(this.priceRef.value.value),
16-
status: this.statusRef.value.value,
17-
desc: this.descRef.value.value,
18-
image: this.imageRef.value.value
14+
name: this.nameRef.current.value,
15+
price: parseFloat(this.priceRef.current.value),
16+
status: this.statusRef.current.value,
17+
desc: this.descRef.current.value,
18+
image: this.imageRef.current.value
1919
};
2020
this.props.addFish(fish);
2121
// refresh the form

stepped-solutions/19/src/components/StorePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88
// 1. Stop the form from submitting
99
event.preventDefault();
1010
// 2. get the text from that input
11-
const storeName = this.myInput.value.value;
11+
const storeName = this.myInput.current.value;
1212
// 3. Change the page to /store/whatever-they-entered
1313
this.props.history.push(`/store/${storeName}`);
1414
};

stepped-solutions/20/components/AddFishForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111
// 1. stop the form from submitting
1212
event.preventDefault();
1313
const fish = {
14-
name: this.nameRef.value.value,
15-
price: parseFloat(this.priceRef.value.value),
16-
status: this.statusRef.value.value,
17-
desc: this.descRef.value.value,
18-
image: this.imageRef.value.value
14+
name: this.nameRef.current.value,
15+
price: parseFloat(this.priceRef.current.value),
16+
status: this.statusRef.current.value,
17+
desc: this.descRef.current.value,
18+
image: this.imageRef.current.value
1919
};
2020
this.props.addFish(fish);
2121
// refresh the form

stepped-solutions/20/components/StorePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88
// 1. Stop the form from submitting
99
event.preventDefault();
1010
// 2. get the text from that input
11-
const storeName = this.myInput.value.value;
11+
const storeName = this.myInput.current.value;
1212
// 3. Change the page to /store/whatever-they-entered
1313
this.props.history.push(`/store/${storeName}`);
1414
};

stepped-solutions/21/components/AddFishForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111
// 1. stop the form from submitting
1212
event.preventDefault();
1313
const fish = {
14-
name: this.nameRef.value.value,
15-
price: parseFloat(this.priceRef.value.value),
16-
status: this.statusRef.value.value,
17-
desc: this.descRef.value.value,
18-
image: this.imageRef.value.value
14+
name: this.nameRef.current.value,
15+
price: parseFloat(this.priceRef.current.value),
16+
status: this.statusRef.current.value,
17+
desc: this.descRef.current.value,
18+
image: this.imageRef.current.value
1919
};
2020
this.props.addFish(fish);
2121
// refresh the form

0 commit comments

Comments
 (0)