Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.58 KB

File metadata and controls

47 lines (34 loc) · 1.58 KB

Inspirce by : React Todo List App Tutorial - React JS Project Tutorial for Beginners

What I learned ?

  1. Strat components by using rafc
  2. useState - to manage value input by users
  3. Define a function include multiple funtion
// funtion like task, toolComplete, deleteTodo, editTodo
const Todo = ({task, toggleComplete, deleteTodo, editTodo}) => {

}
  1. onClick - to call function
  2. use console.log to check the vlaue
  3. AI make mistake and misunderstand the code → need better tool
  4. Cursor response is pretty slow and not precise
  5. CodeGeeX is the best tool to check the code ( response fast and format is easy to read)
  6. Create environment by using create-react-app and without setup issue
  7. Delete installed file like App.test , index.css , SetupTest.js

What issue I fixed ?

  1. "no function" error → add {} for {addTodo}

how to do better next time ?

  1. when display "no function" check {} is inclued the text
  2. writedown my issue, and all possible solutions, try it step by step → I repeat wrong steps and it waste so much time
  3. use console.log to check the value
  4. Focus on useState practice
  5. Clone more project and learn their skill
  6. Check the code by using CodeGeeX

What I don't know ?

  1. what's uuidv4 and how to use ?
  2. how to use map
setTodos(todos.map(todo => todo.id === id ? {...todo, completed: !todo.completed} : todo))

  1. whole logic of to-do list app → I can't create on my own and without referecne