React JS Tutorial - #7 Passing Data with Props

preview_player
Показать описание
NOTE: around 8:00 I made a small typo; I wrote "pause", but really intended to have "paused"! The name needs to match that which is passed in the parent component. Keep an eye for it, we'll make sure to fix it up in the next video!

Sup YouTube! I'm super excited to bring you another episode in our New Year countdown series. This time we'll review properties, or props for short. This is a very powerful concept because it will guide us to making individual and isolated components communicate with one another. Secifically, we'll create a block of buttons or controls, and we'll make them receive a property called "paused", which will indicate (surprisingly!) whether the countdown timer is currently paused. This prop will be lifted up to the state of the Countdown component itself, and will be passed down as an attribute, just like you would write "src" on an img or "href" on an anchor. React however, enables us to define custom props which we could then pass around in order to distribute data. Sounds interesting? Let's dive into this in the video!
Рекомендации по теме
join shbcf.ru