Skip to content

Recursive component usage example (draft) #123

Open
@ceremcem

Description

@ceremcem

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}
]
  1. We can simply display these boxes by using "Partials": Playground link

  2. If we want to display an area property for each box, we may simply use data functions: Playground link

  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions