Skip to content

Syntax suggestion when passing props to components #11103

Closed
@uwla

Description

@uwla

Hello, I'd like to suggest the following syntax that you may add to future releases.

<my-component ::params @@myMethod />

Could be equivalent to

<my-component :params="params" @myMethod="myMethod" />

That would make code much cleaner when we have to pass multiple props to a child component and those props have the same name as the variables in the parent component. The same thing can be said about events.

I hope you take this into consideration and that my suggestion will help you improve VUE.

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