-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
for example, I have a list state like this:
this.state = {
list:[1,2,3,4,5]
}
How can I change the value of the first item of list from 1 to 0?
I usually use like this but I don't believe that is the best way.
var temp = this.state.list;
temp[0] = 0;
this.setState({ list : temp});
Please who can tell me is there any better way to do this ?
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.