Error when using @ProvideReactive: Cannot redefine property
See original GitHub issueWhen I upgrade vue-property-decorator to 8.3.0, it comes with a TypeError: Cannot redefine property
on line Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {
.
I think it was related to #249 and caused by #264 .
const InjectKey = Symbol();
@Component
class ParentComponent extends Vue {
@ProvideReactive(InejctKey) foo: any = {};
}
@Component
class ChildComponent extends Vue {
@InjectReactive({
from: InejctKey,
default: ({})
})
readonly foo!: any;
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:20 (1 by maintainers)
Top Results From Across the Web
Error when using @ProvideReactive: Cannot redefine property
When I upgrade vue-property-decorator to 8.3.0, it comes with a TypeError: Cannot redefine property on line Object.defineProperty(rv[reactiveInjectKey] ...
Read more >Support for SPAs / error when reloading (quick fix!) - Web
I have it destroying/unloading the ZoomMtg object when the user navigates away, but when they navigate back again, there are some issues with...
Read more >InertiaJS with Laravel & Vue2: Cannot redefine property: $inertia
I'm using Vue2 and Laravel 8. I can't find anyone with the same issues anywhere. The error claims that 'App' is no longer...
Read more >Provide/Inject API With Vue 3 - This Dot Labs
Why are we passing a computed property? By default, the provided value is not reactive. If we just wrote provide('username', state.name) , any ......
Read more >vue-property-decorator - npm
property decorators for Vue Component. Latest version: 9.1.2, last published: 2 years ago. Start using vue-property-decorator in your ...
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
set
inject: []
in Component optionsbecause
I just ran into the same issue. When a second instance of a component that uses
@ProvideReactive
is being createdTypeError: Cannot redefine property
is thrown.Downgrading to 8.2.2 fixes the issue.