3 ms·
> I don't particularly like how control logic needs to be embedded within JSX using ?ternary : operators and .map(() => stuff) within the HTML. It doesn't. In
by recursive 1y ago
> I don't particularly like how control logic needs to be embedded within JSX using ?ternary : operators and .map(() => stuff) within the HTML.
It doesn't.
In my[1] framework, there is JSX, but control flow like map is done with a function.
<ul>
{ ForEach(model, item => <li>Fruit: { item }</li>) }
</ul>
There is a lambda there, yes, but at the top level it's a ForEach() function call.
Likewise, it is possible to use get conditional elements in JSX without using react's ugly approach.
[1] https://mutraction.dev/ https://mutraction.dev/