-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
"[Vue warn]: Vue received a Component that was made a reactive object." when using <component :is="ComponentVar" #11921
Comments
Sandbox is not accessible. |
@yyx990803 whoops, my bad. Open public. |
import { markRaw } from 'vue'
export default defineComponent({
components: {Comp},
data() {
return {
compVar: markRaw(Comp),
};
},
}); |
@LinusBorg IKR that this can be fixed with |
UPD: no way that, in that case, it is necessary to use markRaw, because it affects the performance. I think it should be fixed, at least as in my previous report on TransitionGroup, if it is not a more complicated bug. |
I am asking for issue reopen, and more complex test 🙏 |
So, if you can come up with a demo that shows how markRaw has a perf impact, you can open a new issue. But the original problem you reported here isn't one as far as I can see. |
This warning has been around for four years, It's not a recent addition. core/packages/runtime-core/src/vnode.ts Line 626 in 928af5f
see playground |
Whoops, privated sandbox again, my bad. Can open now.
Yep, as i said before - i couldnt reproduce this on the Playground. Maybe the reason is cdn, idk. I can see that the warning is very old, but it still seems strange to me that in older versions I didn't have this warning on the same code. UPD: after like hour of checking, before sending the message |
Update.. |
Vue version
>=3.4
Link to minimal reproduction
https://codesandbox.io/p/sandbox/vue-3-5-test-m3my3n?workspaceId=4d0dccc1-4022-45d1-b1ff-925518ace372
Steps to reproduce
What is expected?
Clear console without warns
What is actually happening?
Console spamming with warns
System Info
No response
Any additional comments?
Doesn't checked this on composition API.
Not sure if this a bug or something changed starting from 3.4...
Will be good if someone explain this to me o:
P.S.
Couldnt reproduce 3.3 in SFCPlayground, so.. codesandbox again, sorry for that :(
The text was updated successfully, but these errors were encountered: