Hi I have a problem in react user input text. I have a list of items together with an input text. When i typed inside the first input, all input boxes changes. how to deal with this.
example code
handleEditChange(event) {
event.preventDefault();
console.log(event.target.name)
console.log(event.target.value)
this.setState({
[event.target.name]: event.target.value
});
};
{items.map(item=> (
<input type="text" class="form-control bg-light" placeholder="Reply" name="reply" value=
{this.state.reply} onChange={this.handleChange} />
))}
So the input box will repeat based on the loop, for example it will be 3 input boxes. picture sample
How can i prevent this? thanks for help
