Update Parent Component State in Child Component - React Tutorial 12

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


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

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

Your explanation was one of the best I've seen on the internet. Nice! Would you be so kind and try to explain how to return info from child of a child? Or even more, without the need to pass callback functions to children that are not using that?

songokussjcz
Автор

Hi Caleb, I am a big fan of your videos going all the way back to the SignalR stuff you did back in the day. That being said, I think there is an error in this video. Isn't it incorrect to update "empoyees" from state directly? AFAIK in this example, you should be feeding your new employee object into "setEmployees()" on the parent.

EDIT: nvm -- I paused the video too early at 11:55

jibreelkeddo
Автор

Hi Caleb, how did u returned back after long period of disappearance ? I thought this channel was dead after u stopped engaging. I used to learn a lot from it long time ago.

simonjunior
Автор

This spread syntax is confusing. So it unpacks all elements into returned object but by adding new elements after coma you override the values for the keys already unpacked.
It's confusing because similar to decomposing arrays through ...rest or composing variables with spread. Need more practice here to differentiate well.

ebrelus
Автор

everything is ok, now i need to update database using laravel, where will be change

SohelRana-irls
Автор

this became hard haha, too many things

Lashistoriasdelilith
Автор

how do you set up updateEmployee with axios?

austintube
Автор

looks like he is just copying code from somewhere, didn't bother to explain any concept.

mhassankhan