issues
search
4GeeksAcademy
/
ToDoList-fksh
Start a React project in 30 seconds: React, Bootstrap, SASS, Gitpod. Video Tutorial.
https://gitpod.io/#https://github.com/4GeeksAcademy/react-hello
0
stars
0
forks
source link
Correcciones
#1
Open
migueldelamo
opened
1 week ago
migueldelamo
commented
1 week ago
Tienes que utilizar la forma de setear un state:
setState(prevState => {...});
cuando haces referencia al valor actual del estado. Es decir, haces referencia a toDoList, dentro de setToDoList.
https://github.com/4GeeksAcademy/ToDoList-fksh/blob/411df1a9c43f1d7f08c7a09b75b2b3f00662e539/src/js/component/home.jsx#L12
frankspaceyhelder
commented
1 week ago
no entiendo Miguel
setState(prevState => {...});
cuando haces referencia al valor actual del estado. Es decir, haces referencia a toDoList, dentro de setToDoList. https://github.com/4GeeksAcademy/ToDoList-fksh/blob/411df1a9c43f1d7f08c7a09b75b2b3f00662e539/src/js/component/home.jsx#L12