It seems like ST 2's refs really encourages you to use ids (the docs certainly do). It also seems that in general, dynamically creating your views and then destroying them when they're not in use to save resources is also the best thing to do. But it seems like when you try to put those together in ST 2, they don't exactly mesh very well.
Or maybe I'm just doing things wrong (the docs aren't helping point me in the right direction, if so).
I have a main view and some sub views. I have a button on the a sub view. I want to hook up some events to the sub view and to that specific button. I have to set up the refs like this:
If you don't use the "[itemId=]" syntax, the events never hook up (or worse, if you use id instead of itemId, they only hook up the first time).
It just seems so... clunky. I just really wish the refs syntax understood how to find a component by itemId without resorting to the attribute syntax. What I thought was an elegant system when I was reading through the docs and trying simple examples turned into something much less so when I went to build a real world application.