Closed issa-tseng closed 5 years ago
And maybe also tackle #69 at the same time.
We briefly implemented app.stack()
here, and it lived through most of 0.3 and even shipped in 0.4.0. But it was unpleasant as it was the only thing still mandating that app get shadowed at each layer instantiation. This seemed like a poor price to pay in return for a poor solution to this problem, so it was excised.
closing in favor of #137.
Views have explicit hierarchy as a result of the rendered object tree. Often, a child view needs to access some state on its parent view in order to properly function. Until now, the "solution" has been to render the child and then pass oneself down into it, or to generate a tree of bidirectionally linked
ViewModel
objects and only then render the viewtree based on that.Instead, some sort of facility should be added to the set of
from
bindings which is resolved byView
s which allows access upward to the closestView
,ViewModel
, orModel
of a particular type or by some other reference method.This needs to be defined and explored further before implementation. For examples of cases where this fails, look at most things I've ever written in Janus. :)