Parent on the left, child on the right. You can think of the two props that connect these components as allowing information to flow in either direction between the two.
The prop called
items is passing data down into the child component. The prop called
deleteItem is giving the child component a way to send some information back up into the parent (“hey, delete this item”).
That’s not really a pattern.
The rest are patterns. I promise.
One of the great things about React, and web components in general, is that you get to iron out the kinks if something in html doesn’t work the way you want.
If you think about the different elements that allow for user input (do it), you will soon see that the naming of these elements is nonsensical, bordering on reckless.
... read the whole story at hackernoon.com.