Explain: Using subviews
See original GitHub issueIf this is in the docs already I can’t find it. Could you please briefly explain the difference between using a subview with the following two forms:
["#ui", // same as "div#ui"
[SomeViewFn], // sub-view w/closured data
preInitVm, // pre-initialized ViewModel
]
Also, I noticed now that the docs only have up to 3 arguments for a subview: function,model,key
. Is this current? I thought there was a fourth, options
.
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
subviews | Apple Developer Documentation
For complex views declared in UIKit and other system frameworks, any subviews of the view are generally considered private and subject to change...
Read more >( iOS ) What is superview and what is subviews - Stack Overflow
A superview is a view that holds other views over it and subviews are the views being held/added over a View.
Read more >iOS Programming Video Tutorials - Introduction of Subviews - 1
Hello Everyone,This video will introduce how to mange and use the subviews in iOS Application.To learn more languages please visit this ...
Read more >What is 'subview' in iOS? - Quora
It's a View object that belongs to another View object. Usually, though by no means always, this means that it's a part of...
Read more >SQL Developer Data Modeler Quick Tip: Use SubViews
SubViews allow the user to take a group of entities or objects from the main model area and place them in a separate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
gonna close this, but feel free to inquire further if still needed.
@lawrence-dol it looks like in recent versions, the sub-view overhead has been reduced. in addition, if you have immutable data that you can cheaply diff between redraws, you can use sub-views to greatly increase perf as well.
the situation is somewhat nuanced and depends a lot on your data. i just pushed f0768ee41d0a17fcdec948636409c9152b777509 which implements a sub-view based dbmonster with optional immutability optimizations. Notice that the keys in all the subviews are
false
, which speeds up the diff by avoiding any subview reordering lookups and treating them as slots (it works in this dbmonster case because we have knowledge of how the data mutates, same for the immutability optims).Play around with it in all 3 variations across the full range of mutations 0%-100% and look at how the FPS behaves as well as the cost of the “view update” (ms).