0

I have a state in my class component:

this.state = {
  todos: [ {0: "Wake up"}, {1: "Have breakfast"}, {2, "Have lunch}, ... ]
}

How can I remove an specific element from todos without mutating the array itself? I then want to set todos to a new array without that element.

Any help is appreciated as I am new to React!

smexyuwu
  • 35
  • 3

0 Answers0