Replies: 1 comment 5 replies
-
There is a ESLint rule: https://eslint.vuejs.org/rules/no-dupe-keys.html |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I am studying props atm and I am, frankly, baffled by the fact, that you can create name collision between data() properties and props. I have been searching for an extension/linter or vue settings that would automatically throw an error if such name collision occurs.
To be honest, so far it is incomprehensible to me. If it is bad to have name collision between props and data then why don't props have an explicit, enforced syntax that would clearly distinguish them from data properties? A simple, enforced prefix would suffice.
What am I missing? What's the catch? Why do devs allow this and force users to check for collisions manually? Is there a benefit in it that I am missing currently?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions