Skip to content

Improve the section about Single Root Element #2147

Open
@Masa-Shin

Description

@Masa-Shin

https://vuejs.org/v2/guide/components.html#A-Single-Root-Element

So this might be a good time to refactor the component to accept a single post prop instead:

I suppose refactoring to accept a single prop is not a good practice now for the following reasons.

  1. You can now pass an object to the component without changing the definition of the properties, as mentioned here: https://vuejs.org/v2/guide/components-props.html#Passing-the-Properties-of-an-Object

  2. It makes harder to validate each original prop.

So I'm wondering if we should replace it with one using v-bind without an argument (or at least add a note about it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions