8000 Rule for Props is too strict · Issue #1320 · vuejs/eslint-plugin-vue · GitHub
[go: up one dir, main page]

Skip to content

Rule for Props is too strict #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
duongvanle opened this issue Oct 7, 2020 · 1 comment
Closed

Rule for Props is too strict #1320

duongvanle opened this issue Oct 7, 2020 · 1 comment

Comments

@duongvanle
Copy link
duongvanle commented Oct 7, 2020

After I updated this repo up to 7.* I see that it warns me to change prop from child component.
Let me explain more clearly.
I have a parent component P. P has a child component C. P pass data to C .ex: INFOR = {a: 1, b: 2}
And of course C has Props property corresponding.
I want that if child component C change INFOR, only change value of a or b property, NOT add new or delete current property, it also change same thing in the parent component P. In short like data-two-way binding. I want to take advantage of the reference of object property, Or value of element in an array, also not add or delete any element. This one also happens even with VueX.

Vue also say about this problem
Screenshot_2020-10-07 Props — Vue js

This way help me to save time instead of writing $emit event, and code look more simply.
Why is this one prevented from this version 7.*
Can you explain to me why I shouldn't do it while I think I can take advantage of the reference

@ota-meshi
Copy link
Member

I don't know which rule you're talking about, but it's probably the same issue as #1314.
You are free to turn off the rules in your configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0