In most cases there will be always exceptions in the every rule. So the every block will not be very useful in most cases because of the exceptions.
What would be the benefit in comparison of the few blocks you need to do the same? And in what cases do you think to make things apply to all labels, buttons, etc.
@Peter I beg to differ.
Once our dynamic components palette becomes considerably large, I think it’ll be easier to have a “for_every” block that handles all the instances of the dynamic component.
We’ll see how things pan out in the future and if such a block becomes a real necessity. Right now, it’s just syntactic sugar.
I can imagine you are right when looking at the dynamic components. But looking at the standard components spread around the screen in different arrangements etc. i think the method i offered is still the most effective one.
Dynamic components can be effective for instance when loading 123 images inside a horizontal scrolling arrangement.
I think it all boils down to learning vs working.
If you’re learning to make an app, then it’s better to explicitly maintain a list of your components and then loop them over. It gives you a better idea of what’s going on.
But if you’re making an app for professional use, then having that list implicitly maintained by Kodular code will help reduce bugs, I think.