> "looks" easier
I should have been clearer and said: it actually is easier to reason about the html and the dynamic rendering with the approach Glimmer takes.
I should have been clearer and said: it actually is easier to reason about the html and the dynamic rendering with the approach Glimmer takes.
Do this in a template for instance:
import range from 'lodash/range'
const Item = ({ number }) => <li>{number}</li>
const App = () => (
<ul>
{range(0, 20, 5)
.map(index =>
<Item number={index} />
)
}
</ul>
)
Templates can't even resolve <Item> because they don't know scope. The have no access to `range` either. Instead we're now hacking around with template registrations and injections. This results in a mess of functionality sprinkled all over the place for no good reason.