ReactJS Tutorial 19: Conditionally Rendering List Items

preview_player
Показать описание
In this lecture we will learn how to conditionally render list items in React.
Рекомендации по теме
Комментарии
Автор

firstly I greatly appreciate this series and also your straightforward no frills explanations. I have a question regarding this lesson, instead of using fragments why don't we just return the <li> components such as:

return price>10 ? <li>{emoji} {name} {price}</li>: "";

It seems to work the same or if I'm missing something it would sure be helpful if you could point that out.
thanks again.

TheAzrayell
Автор

Thanks for this great tutorial. Mmm 5:12, what about this alternative instead of ternary with empty string: return (
price > 5 && (
<li>
{emoji} {name} {price}
</li>
)
);

danielurizar
Автор

pleas upload more videos or just a bit longer once, i got here in 2 days and i dont want it to be over . very nice videos and lessons thank you!

roni_yosipov
Автор

Can we use filter functional programming?

mr.RAND
Автор

preferably use the <array>.filter function for filtering instead of ternary to be honest. Useful tip about fragments :)

PanagiotisHalatsakos
Автор

Outstanding lecture.. No bakwas only sidhe bat

ferdause