Hacker News new | ask | show | jobs
by catshirt 5036 days ago
awesome, yep. sounds nearly identical to my tactic; with 2 minor exceptions. first being i don't necessarily have a unique model for each view- lots of times my subviews use the same model as the parent or sibling views.

second is i actually define the sub views element from the parent view on instantiation, and operate under the assumption that all subviews will render by emptying their element and replacing it's contents. the primary reason is so the root subview element never changes (which can lead to complexity).

1 comments

Same here for subview rendering.

About the models I prefer to use an unique one for maintenance and team development cause it's harder to accidentally break things.