Why Can’t We Use a For Loop in the Return Block of a JSX Component (React) #reactjs #reactdeveloper

preview_player
Показать описание
When we try to put a for loop into the return block of a React JSX or TSX component, we get an "expression expected" error. This video explains why and what to use instead.

📣 Follow Coding in Flow on social media:
Рекомендации по теме
Комментарии
Автор

Duuuude just answered a question that I’ve been stuck on for an hour! High level stuff man kudos

jakem
Автор

I hope i knew this before just because of this i rejected in interview ☹️☹️i searched after interview and got it actually it was chess taks to create ui dynamic and i was going one by one☹️ ..

yogeshvanzara
Автор

Yeah and that’s pretty dumb they better have a Svelte like syntax : {#for … in … }

xthesly