Комментарии:
At 27 minutes, isn't it better to make the id like this
id: toDoList.length+1
What is your vs code theme?
ОтветитьConcerning the id part u can also try this
const task ={
id: todoList.length+1,
taskName: newTask
}
setTodoList([...todoList, task])
}
pedro, you made it simple !!
Ответитьthanks Pedro, may God bless you for the time and effort you have put in. I am guessing we can also use the ternary operator in the complete task function, as you love using it :-)
Ответитьwhere is the CRUD stuff bro! this is only about delete things😢
Ответитьgood video man had to watch a couple times but i understand roughly 90%
ОтветитьWhat will be the way if we are not passing the delete function as props?
Ответитьyour examples are very good for clearing concepts
function App(){
const [todoList, setTodolist] = useState([]);
const [newTask, setnewTask] = useState("");
const handleChange = (event) =>{
setnewTask(event.target.value);
};
const addTask= () =>{
const newTodoList = [...todoList, newTask];
setTodolist(newTodoList);
};
return (
<div className="App">
<div className="addTask">
<input onChange={handleChange}/>
<button onClick={addTask}>Add task</button>
</div>
<div className="list">
{todoList.map((task) => {
return <h1>{task}</h1>
})}</div>
</div>
);
}
I didnt understood the ID and the completed task part can anyone help me with that
ОтветитьThanks man for this tutorial
ОтветитьWhy do you use const to functions?
ОтветитьBro help everything is going over my head you are fast
Ответитьthis is the hardest episode yet 0_0 had to go 0.5x speed 0_0
ОтветитьAwesome Explanation Pedro
ОтветитьNice tutorial and exercise 👍
Ответитьfor deleting a task, you can simply do something like this const handleDelete = (index) => {
const updatedTasks = [...tasks];
updatedTasks.splice(index, 1);
setTasks(updatedTasks);
};
where index is the index of each element in the array that you grab from the map function
Thanks Pedro !!!!!.
ОтветитьWhat to do if we have to take input more than 1 input from the user how to store it.
Ответитьwhat if we filter with task and index => const newTodoList = todoList.filter((todo,x) => {
if(todo === task & x === index){
return false
}else{
return true
}
Which theme are you using ? Reply please
ОтветитьGreat video bro!
ОтветитьThank you.
ОтветитьThanks Pedro, more grease to your elbow.
Ответитьafter watching this 2 times now i can do it basically alone
.
.
.
***but with a little help in syntax...😅
Pedro vc e brasileiro???
Ответитьthanks pdro
with your amzing course
Great vidoes. I wish you had explained why the delete had to be wrapped in an arrow function
ОтветитьYou rock man! Thank you 🙂
Ответитьand after going through too many react tutorials i stopped at this one. Thanks pedro Tech
ОтветитьMath.floor(Math.random() * 100) better and simple for generate id
Ответитьinstead of creating an id, we can use the index of the array to identify it.
Ответить'task' is assigned a value but never used .....--> how do i call the "task" var ??
ОтветитьThis is a great course. I'm trying hard to get my first internship in Software Dev right now, and I started recognizing that React kept popping up. React has been appealing to me for awhile now, but that was a push. Your course is helping me a lot, thanks. (:
ОтветитьWhy is the map working without any problem? I thought we need a key value?
Besides that: I love your way of teaching and would love to see you making a tutorial where you do complex apps like a food-order website with the dashboard for the shop or an appointment-maker app with a dashboard.
Keep up this great work!
thx for the great explanation!
ОтветитьGod bless you
Ответитьwhat about update operation????????????🥺🥺🥺🥺🥺🥺please teach that
ОтветитьGreat content. But please try to explain everything you do. Especially 33.00 to 35.05 where you passed props without saying why. Explaining will help for better understanding and not just copying. Also not to rush when talking lol. Great content. I’d always like and I’ve subscribed too.
ОтветитьI've spent like 2 hours to solve it. omg it's too easy.
ОтветитьSimple, yet brilliant!
Ty Pedro, you are the best!
🙇🤜
Maybe you could make a tutorial on how to make a MERN blog, with images stored in Cloudinary 🤗🙏?
ОтветитьThank you so much, sir 👍🤝
ОтветитьHey Pedro, I really struggle with CSS could u make a good tut on that!
Ответить