Skip to content

{{#each ...}}...{{else}}...{{/each}} #90

@Rich-Harris

Description

@Rich-Harris

Suggestion via Twitter – an else block for the special case when your array is empty:

{{#each todos as todo}}
  <Todo description='{{todo.description}}' done='{{todo.done}}'/>
{{else}}
  <p>Nothing left to do! Congratulations, turn off your laptop and go outside</p>
{{/each}}

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