allowing camel-case props
See original GitHub issueWouldn’t this …
props: {
'prop-a': String, // type check constructor
'prop-b': null, // accept any type
'prop-c': { // object descriptor
type: Number,
required: true,
default: 100 // new: default value
}
}
Match the other options more if it was …
props: {
propA: String, // type check constructor
propB: null, // accept any type
propC: { // object descriptor
type: Number,
required: true,
default: 100 // new: default value
}
}
The camel case would appear in the html as prop-a
of course.
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Why does Material UI's "withStyles" not allow camelCase props?
The problem isn't that material-ui won't accept camel case props. You can confirm that by looking at all these components with camel case...
Read more >Props | Vue.js
We declare long prop names using camelCase because this avoids having to use quotes when using them as property keys, and allows us...
Read more >Object, Naming, Props - Gorm Rest Api - GitHub Pages
be consistent · property names must be camelCase · Property names must be an ASCII subset. · Array and collection names should be...
Read more >camelcase - ESLint - Pluggable JavaScript Linter
/*eslint camelcase: ["error", {allow: ["UNSAFE_componentWillMount"]}]*/ function UNSAFE_componentWillMount() { // ... } 1 2 3 4 5.
Read more >Vue.js: hyphen-delimited equivalents of camelCased props ...
... of camelCased props are not recognized in templates (camelCase vs. kebab-case) ... attributes 'required-prop' and 'two-way-prop' are not allowed here ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I gave it another thought and maybe this can be implemented with backwards compatibility. Vue could detect camel case props and look for hyphenated attributes in HTML.
Ok~ https://github.com/vuejs/vue/issues/3263