salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.63k stars 395 forks source link

Log an error message when an attribute set in the template is also set via property outside of the template #1258

Open ekashida opened 5 years ago

ekashida commented 5 years ago

The logic we had in place to catch this was not accurate in that it would log the error for any non-root component setting a value through the element prop: https://github.com/salesforce/lwc/pull/1193/files#diff-57b9dec7c1ef7c4d63147ac2a47e1772

We can be more precise by keeping tack of which props/attrs are set in the template (https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine/src/framework/modules/attrs.ts and https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine/src/framework/modules/props.ts) and only logging the error for those.

caridy commented 5 years ago

@ekashida I think we have decided to remove this error... can you confirm and close?

ekashida commented 5 years ago

@caridy iirc we removed the error because it was logging too many false-positives and we created this issue because we thought that it would be possible to improve its accuracy.

caridy commented 5 years ago

ah, that's right.... let's keep this one.