vuejs / vue-class-component

ES / TypeScript decorator for class-style Vue components.
MIT License
5.81k stars 429 forks source link

props no longer work in chrome version 97.0.4692.71 (Official Build) MacOS and Windows 11 #585

Closed alexvenetis closed 2 years ago

alexvenetis commented 2 years ago

Versions

"vue": "^2.6.12"
"vue-class-component": "^7.2.6"
"vue-property-decorator": "^9.0.2"
"typescript": "^4.5.4",

Browser MacOS and Windows 11 Chrome 97.0.4692.71

Steps to Reproduce: After updating my chrome browser to Version 97.0.4692.71 (Official Build), I am getting the following Vue warnings in my console, and my component is not rendering:

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value.

Has anyone else encountered this issue?

What is expected? Usually the component renders with no warnings or errors

Temp Workaround Downgrading to the previous version of Chrome resolves the issue. Safari and Firefox have no issues

alexvenetis commented 2 years ago

After doing some further research, I was able to find a workaround for the props to work again in Chrome 97.0.4692.71

The workaround is documented in the vue-property-class repo. It appears that the issue is related to typescript.

https://github.com/kaorun343/vue-property-decorator/issues/393

mostley commented 2 years ago

Thanks Alex, you sir have earned yourself a coffee!