Complete React Tutorial ( & Redux) #19 - Deleting Data

preview_player
Показать описание
Hey, in this React tutorial I'll explain how we can delete data from the state.

----------------------------------------

🐱‍💻 Course Links:

----------------------------------------

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

I basically came from udemy course for some quality lecture and boy I do find one.
The teaching style is far superior.

jackfrost
Автор

Bro I love your videos. I had to learn AngularJS in like a week and stumbled upon your videos. Quite helpful, easy to follow and clear.

Jaracara
Автор

Such an underrated youtuber .Love it <3 . God bless brother.

gauravgooner
Автор

Thank you for such an amazing series. Stay blessed brother

SimPwear
Автор

this is a really good tutorial! but you use ninja in literally everything, so it gets really confusing at times .... other than that this is the best there is

anamolmaharjan
Автор

A small bug which you might stumble upon :
If you enter some data in the form and submit then don't change anything and submit again you'll get a warning and weird behaviour when deleting the items. This is because of how states work in react and a good example on why you shouldn't pass around component states in your app. Pass the individual state values instead to fix this and avoid weird behaviour and duplicate warnings. You can check whats actually happening by logging the 'ninja' first when you receive it in 'addNinja' and then after you update its id property. The addition of the 'id' property mutates the state of the 'Ninja' component which persists *IF* onChange isn't triggered. So when you click submit for the second time, math.random() updates the *ninja states'* id i.e. our current state and the saved persisted state from the previous Submit event.

msx_
Автор

with this tutorial there is no need to others, I guess. awesome, clear and so friendly. but just to much using Ninja and Ninjas makes it a little confusing. thanks excellent teacher

peymanpishgah
Автор

Thank you! Your explanation of the spread operator was very helpful!

kendo
Автор

Wow! It is done in such an amazing style and with such clarity that even a tree would understand React!! I'm surprised not to find any of your courses on Udemy. People with one third your skill set are making money with a lower quality content. Hope to see you there soon. Thanx and gratitudes!

ahmedmusawir
Автор

❤ just !! You are amazing
Thank you for all your efforts.. i really appreciate your explanations are awesome and easy to understand
Keep going ❤ all the love thank you 💕

nesrinelach
Автор

It works! The 'filter()' method is great! Thanks!

Cho
Автор

there's something wrong when new element is added and then same element, entries with same content are submitted as duplication - same id is generated by Math.random() when it's supposed to generate always different number...or I don't get it somewhere

PaweGrycz
Автор

I assume if you connect with a database. The state ninjas array will be a JSON? And if you have 1 million ninjas in your database, you still copy the whole array to add that one new ninja? Or is this just a hard-coded example?

FarryEntertainment
Автор

idk how you do it, but you make React enjoyable for me lol

albertvaldes
Автор

Thanks for the video.
Whats the font Family and ThemeColor used?

RichellyItalo
Автор

Thank you for all your efforts.
I do not understand why you have to use the destructor to use deletePlayer

romainmartine
Автор

excuse me can I use the splice method instead of filter and give argument index states for function Ninjas and set

javadmohammadi
Автор

I found one issue with this..if you enter two ninjas one after another without doing any change in the Name, age and belt fields, you get an warning saying "Encountered two children with the same key". And if you delete any of them, then both the ninjas are getting deleted..It would be great if anyone confirms it and answers what should be done to tackle this.

arjabhattacharya
Автор

This may be answered in later videos but I'll ask anyway...If we have to make a copy of the state everytime we do an add or delete, wouldn't it become very inefficient when our clan grows and we employ thousands of ninjas?

conaxliu
Автор

when you click on delete the second time around it wont execute the method and thus won't log the id to console could you clarify it? thanks

ahmadibrahim