Skip to content

{{yield}} #5

Closed
Closed
@Rich-Harris

Description

@Rich-Harris

Once #4 is implemented, need to figure out a way to yield, without which component composition is somewhat limited:

{{#if error}}
  <Modal>
    <p>something went wrong!</p>
    <button on:click='set({ error: null })'>dismiss</button>
  </Modal>
{{/if}}

In Ractive that's done with the {{yield}} operator, and it works well. For simplicity's sake, probably best just to have a single yield per component (i.e. no named yields, and no yields in #each blocks) for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions