[MGNLUI-4996] Allow view context auto-creation Created: 04/Feb/19 Updated: 17/Apr/19 Resolved: 17/Apr/19 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1 |
| Type: | Task | Priority: | Neutral |
| Reporter: | Aleksandr Pchelintcev | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoR: |
Empty
|
| Epic Link: | UI framework: basic features |
| Story Points: | 5 |
| Description |
|
View contexts are useful concept when it comes to sharing the state of the UI: the parent view may bind and share a context, child views - inject/subscribe to/mutate it. However, for better re-usability of the views, we should avoid explicitly creating the contexts in the view logic: what if in the other scenario the current root view is just a sub-view of smth even more massive that would also rely on the same context? As a solution to this we can let the views inject even not yet created contexts - just instantiate and bind them on the fly upon injection. Expected result:
|