Skip to content

Supply SetupContext as first argument to SetupFunction. #154

Closed
@Eckhardt-D

Description

@Eckhardt-D

Currently the setup function receives (props, context). Components won't always be fed props from the parent, but will always need the context, therefore I reason that the props argument must be made optional and context must be provided as the first argument.

What this solves:

Mainly developer experience eg:

setup(_, { emit }) {
  ...
}

Can become:

setup({ emit }) {
  ...
}

Avoiding redundant exclusion of props if not supplied by parent and developer has choice to access it or not.

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