Skip to content

Warn the user when trying to use props in camelCase #5145

@CodinCat

Description

@CodinCat

Vue.js version

2.2.1

Reproduction Link

http://codepen.io/CodinCat/pen/Qpdrjq?editors=1010

What is Expected?

A warning.

What is actually happening?

The like above doesn't work correctly (at least, not most users expected) because it is passing aProp in camelCase. Change the template code to :a-prop can fix this problem.

But as you can see, there is no error message nor any warning. It just displays nothing. Sometimes this may make users spend hours to debug. Besides, There are a lot of questions on Stackoverflow because the camelCase and kebab-case problem.

I have to say I make this mistake sometimes, because I switch between React and Vue. If Vue can show a warning for this case would be very helpful.

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