Skip to content

Idea for nicer syntax: Use handlebars subexpression #2

@MajorBreakfast

Description

@MajorBreakfast

In the talk Stefan (@iStefo) came up with the idea of doing something similar as is done in the link-to helper.

Example:

{{#link-to 'posts' (query-params direction="asc")}}Sort{{/link-to}}

I thought about it and there are at least two challenges:

  • How to call it. Subexpressions aren't scoped in any way. I think calling it component clashes with the component helper
  • How to specify the direction of each property. Mind, we can rename things, e.g. from -> outwards, but even with that it's hard to make it so that the syntax is easy to remember and when read aloud forms a somewhat grammatically correct sentence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions