What's the difference between a Marionette Layout and a Region?

前端 未结 2 1923
谎友^
谎友^ 2021-01-29 19:06

Marionette provides two components named Regions and Layouts. At first glance, they seem to provide similar functionality: A location on the page for my application to place sub

2条回答
  •  囚心锁ツ
    2021-01-29 19:38

    A Region serves as a container for Views (that they're shown inside), while a Layout serves as a parent view for nesting child views inside it.

    Since a Layout is an ItemView itself, it's shown inside a Region. A Layout will also contain Regions for showing its child views. If the child views shown in a Layout's Regions are Layouts themselves, they can have child views of their own. Hence, Layouts let you nest views into a tree-like structure.

提交回复
热议问题