|
|
|
|
|
by kozlovsky
4047 days ago
|
|
> However, all template languages are inherently crippled: they can never achieve the same expressiveness and power as code. Quite simply, {{# each}}, ng-repeat and databind="foreach" are all poor replacements for something that is native and trivial in JavaScript: a for loop. On the other hand, when using a template language I can put `foreach` loops and `if` conditions right into the template itself. And when using JSX I need to calculate the result of a `for` loop before the actual template and it looks much more complex and cumbersome. |
|
You can inline eqivalent JavaScript statements in JSX, without typical template language limitations in terms of allowed expressions or scope: