React JS Tutorials for Beginners - 11 - Updating State and Removing Components

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

wathced a bunch of react tuts, but this is the most clear one and easiest to understand, can't wait for more. Thanks Bucky :)

giedriusladyga
Автор

damn! you are better than indian tutorials bro! direct to the point and not creating many file that are so confusing! love that

imjustnobody
Автор

All tutorials are awesome. Very helpful. Thanks man!!!

muhammadainulhassan
Автор

6: 15 more convenient way to do it => filter

ericellison
Автор

I'd love it if you did a ES6 tutorial mate

cybersteel
Автор

@6:17 this does not give you a new array. arr is a reference to this.state.comments and when you spliced it, this.state.comments only has 2 items in it too (as it's the same object). The reason it does not update the view is because you need to trigger it manually.

zebishopcom
Автор

Excellent set of tutorials, thanks for sharing!

MikeStock
Автор

why not have the updateComment() in the Comments component itself instead of the parent Board? Please help.

chunkybyte
Автор

Great tutorials thanks Bucky :) really easy to understand. One thing I might mention at 7:13 you say 'we made a copy of the array' - but isn't it actually a reference to the array? The original comments array changes as well.

zs
Автор

Hi guys, i wanted to add <br /> so that so that new comments
appears at the next line...Suggestion Thanks

gualgui
Автор

Bucky is awesome! Thanks for your work, dood. Boom roast it!

brianblackie
Автор

I should've asked this in the previous tutorial: If we were using another language (Let's say Java), we treat "Board" as if it was a collection object of object "Comment".

eliasdargham
Автор

I'm getting a 'TypeError: this.state is null' and I can't see why, my code is exactly the same as his code. Has something changed?

charlottewilkinson
Автор

Thank you Bucky, it is great tutorial. I was wondering that if it is a too big overhead to change the whole array to update one single component. I guess the mechanism behind would iterate each element to compare the current value to the previous one, and propagate the changes once a difference is found.

vincentzhang
Автор

Great!!!!
Thank for your tutorials!!!!

DeRekLTF
Автор

I remember you : ) You were telling django

Автор

Hello I love your videos but I have a question. Idk how that worked but shouldnt the logic in removeComment be:
arr = arr.splice(i, 1);
in line 74 instead of just
arr.splice(i, 1); ?
I mean arr.splice(i, 1); was unassigned.
Thank you for anyone that will answer.

ccrze
Автор

I wonder why would you want to do this with data that isn't even saved anywhere? How about sending an AJAX call when you edit or delete a comment to the server and then get an updated list back?

theanswerga
Автор

Are you sure that's a copy of the array? Or it's something React does?

JonathanZhang
Автор

why can you not do "this.state.comments.splice" ?

ibuprofen
visit shbcf.ru