Open
Description
This is a draft for recursive component usage:
Example: Recursive Boxes
Boxes might contain some other boxes recursively:
boxes: [
{width: 1, height: 2, boxes:[
{width: 44, height: 55},
{width: 66, height: 77, boxes: [
{width: 88, height:99}
]}
]},
{width: 3, height: 5}
]
-
We can simply display these boxes by using "Partials": Playground link
-
If we want to display an area property for each box, we may simply use data functions: Playground link
-
To set height of the boxes by their "virtual" area property, we may use components: Playground link
Changes
- Reduced number of examples, simplified
area
component - Added buttons to add new boxes to current branch
- Removed unnecessary component conversion.