Skip to content

New prop shorthand #5835

Closed
Closed
@maurop123

Description

@maurop123

What problem does this feature solve?

When passing props to a component, the following pattern is very common,

<my-component :propA="propA" :propB="propB" />

I am proposing that when the prop name is the same as the variable name being passed to it, that the following more concise syntax be applicable,

<my-component :propA :propB :propC />

This would mimic ES6's object property declaring shorthands (like here http://www.benmvp.com/learning-es6-enhanced-object-literals/)

What does the proposed API look like?

<my-component :propA :propB :propC />

instead of

<my-component :propA="propA" :propB="propB" />

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