Creating a Todo List App in React using Typescript (Part 2)

preview_player
Показать описание

--

In the second installment of our series, we add dynamic functionality to our TodoListItems and add a TodoList container.
Рекомендации по теме
Комментарии
Автор

Thank you for this. I thought I watched nearly every video on Typescript and React and you showed some stuff I specifically wanted to know. One thing I'm curious about. Do you typically pass the event handlers from the parent to the child component? Is that normal? I keep seeing examples where the component defines its own event handlers.

mattmarkus
Автор

First of all, great videos, I'm loving them!
I've recently started learning React with TS and these videos are great tutorials for that.

But for the error where you needed to pass in `toggleTodo`; couldn't you have just made it an optional parameter? i.e.

interface TodoListProps {
todo: Todo;
toggleTodo?: ToggleTodo;
}


as you don't really have to pass it in everywhere, right? Or maybe I got this whole thing incorrectly.

Once again, amazing videos, I'm loving them so far (:

kernel_developer
Автор

These videos are great! Thanks for making them. Your naming is a bit confusing at times (todos.jsx, todos, todosList, etc etc) but other than that great vids!

mwfunhouse
Автор

could you pls provide source code link? thks

gavinchan
visit shbcf.ru