Creating The Simplest React To-Do List

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

#shorts
Рекомендации по теме
Комментарии
Автор

Why not using a map, I know it's 2 arrays but it seems more suitable for this kind of things

brucewayne
Автор

Thanks Jack for bringing these new functions to light! Do we have metrics in terms of memory consumption, speed of execution etc? Or they perform identically to the spread operator? Also, as other commenters said, the naming of the methods can be potentially confusing.

PhilipAlexanderHassialis
Автор

Kinda looks like Dart with copyWith( ).

Dev-Siri
Автор

I don't understand the reasoning behind naming those methods. After this video, I would rename the "with" method to "replaceAt" and the "toSpliced" method to "deleteFromIndex".

ofadiman
Автор

In the "old approach" i would just use todos.map()

ElektrykFlaaj
Автор

I wonder why JavaScript does not have remove(element) and removeAt(index) methods like it's essential omg

nested
Автор

The original ways are more verbose and easier to understand.

bren.r
Автор

I kind of agree on the everything else, apart from the delete. Won't filter be much shorter and faster? Why is toSpliced better? That said, is splice actually better than filter method? I feel like it's always the opposite.

ichiroutakashima
Автор

Neat. But still no Firefox support yet.

muhammadlahin
Автор

In my humble opinion, I don't think it's practically useful because in a real project you'll probably face something more complex that you'll just wanna do by hand( destructuring operator + classic for loop) instead of wasting time searching for the most beautiful way of writing it

yassinesafraoui