Город МОСКОВСКИЙ
00:12:17

React JS Tutorial - #8 Parent-Child Communication

Аватар
Секреты Реактивного Программирования
Просмотры:
19
Дата загрузки:
28.11.2023 14:46
Длительность:
00:12:17
Категория:
Технологии и интернет

Описание

Next, let's make our controls talk to the parent or "master" component. We want to be able to invoke a method on the countdown whenever Pause or Resume button is clicked. To achieve that we'll use props once again. Turns out props not only allow you to pass down data, but also behavior. The countdown component will pass a reference to its method, which the controls component will execute whenever the onClick method fires. That's how components communicate in React. More on that in the video...

Рекомендуемые видео