Open twerth opened 9 years ago
This will help with some of the semantics in discussion over on RedPotion. https://github.com/infinitered/redpotion/issues/63
we have a few places that we replace all the views when something happens (like a user enters their weight, and we want to remove an empty state and show a current state, I could see this being a bit cleaner with something like this in place.
In my case its messy either way, I think - but this might be less messy :)
Jamon and I discussed this new feature, you can do this now with rmq, but this is symantically very nice:
replace_children
will simply remove all children, then returnrmq(@my_view)
, which can be used with Jamon's new do syntax. So really replace children is just a nicer way to dormq(@my_view).children.remove.back
(assuming that works with remove).What do you fellow contributors think?