DEV Community

Discussion on: How to build a React CRUD todo app (create/read todos)

andreisaliba profile image
Andrei Saliba • Edited on

When you make your id "todos.length + 1", delete a task and add a new one you can have multiple tasks with the same id.

joelynn profile image
Joseph Lynn Author

@andreisaliba that's true. That was the simplest way to create an id to get the app started. But now that you mention it, I do think using new Date() would have actually been a better simple solution. This will be address in my 5th post when I refactor the application. Appreciate the feedback!