Yes. i am still working on that MERN stack project like since forever and i am not ashamed of it!
However however, I found an error, from one of the pages, i could not edit the input text.
and it was because I set the onChange function in a wrong way.
So, since onChange function is already bind to the state, I mean the object of gift(name of my data model), adding the onChange with this.state....seems to cause the problem.
Aside to this, I got to overcome my bad vibe which was from the project by chilling enough and coming back to the project after a nice and short break. Then I could fix the errors by keeping calm and coding on. The errors that felt like I would never be able to solve. That's life!! I'm happy with it..
However however, I found an error, from one of the pages, i could not edit the input text.
and it was because I set the onChange function in a wrong way.
<div className="form-group">
<label>Gift Name:</label>
<input type="text"
required
className="form-control"
value={this.state.gift || ""}
onChange={this.onChangeGift}
//setting on change to be
//onChange={this.state.onChangeGift}
//prevents editing from user
/>
</div>
So, since onChange function is already bind to the state, I mean the object of gift(name of my data model), adding the onChange with this.state....seems to cause the problem.
Aside to this, I got to overcome my bad vibe which was from the project by chilling enough and coming back to the project after a nice and short break. Then I could fix the errors by keeping calm and coding on. The errors that felt like I would never be able to solve. That's life!! I'm happy with it..
댓글
댓글 쓰기