ASMR Coding | Todo-list in React: adding a new todo (part 2)
This is a coding video, ASMR formatted. Watch me code a little todo list with React.js while I give you ASMR tingles.
This is part 2 of this series where in the this part I continue from where I have left off in the previous part. In this part I add a form as a React component that lets the user input a new todo item, which adds to the list. I also check the input every time the input field is changed using a use effect hook. I do this while typing and talking quietly. Note: please do not mind my css!
Note that I did not intend to make this 100% a tutorial, but you might learn something despite it. This is for your ASMR tingles as you watch me code. I made keyboard sounds as I code as well as speak in a quiet room voice for the tingles.
[0:00] Intro
[2:14] TodoForm component
[4:55] function to handle form submit
[12:27] getting the input text
[15:32] keeping track of the input text as a state
[21:28] adding a new todo
[24:52] input validation to not allow empty items
[27:59] display error text with useEffect
[33:19] conclusion of part 2
[34:47] End