Skip to content

[Vue warn]: injection "Symbol(ssrContext)" not found. #7400

@sj7112

Description

@sj7112

Vue version

3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#__SSR__eNqNVMGO0zAQ/ZVRLu3utkn3GtICAglxQCCEOOXippPirmMb2+mCovw7YztJ0y5CnBKPZ+Y9v/Fzl7zVOj23mORJYSvDtQOLrtUgmDxuy8TZMtmVkjdaGQcdfFIHJr4YpS30UBvVwCLNPgi1Z2Lxasp7pxo97fqFh1jM2hhkleNnnJr4faovJUClpHWgmXkvjvkccDuVLTufCND4ze8cn3OombC4imHHncAcFg6tWwwxg/VNpFKtdDlswrK/I3SAC77PDNgEu7yD7Q4GzEgsDdXbTajqA/MiiwKSXLRw2GjBHNIKoNi3zikJbyrBqycv69id1DVIihdZTInpQb/zmo6HIj8IP4gIS+ldN2fQ90VWUTbVFdmEmaySKPW6YTo9WSVpvoF/OWzQWPPxRGVC6vt1mfxwTts8y2xd+ZGdbKrMMaO/1BAYbzBF26z3Rj1bNNS4TAYxQ4+Mgmc0a4PygAbNv3repL7oG3QtZU9HGS+Qv6PXsh74GXKaLOlDKqX0F26rJwTQdT42qDQGCyuU29Go/Cf0yKjJtXphfoMZZjaIxghF/2uHWaZTX7G2KzhgzSWGkhX4z7ff+q82yO7vA+l70D45/mczgwyemDUcbUHnnoZLbiCAHD7vT1g5YHYCLS7kd8MUvU1+ttzgIQdn2tFP/cUi18wEl090Mm+ulwSJBdGL514GtimFRp+dmSGfNmgoh4T9KB1dCCaWdSvJ4uQVMl04wjTElLZbhIctPPoeHkQJTIU6LuP4oyXL5OGmJED2q8fNZjOiT16l6xXHlTpL9wt/hXFxz6ZmFc4HHNjMXpy9IngmQ8fhxbHOcHkMkfDezNaBz+scZNvs0VCoT/o/Q1TYhg==

Steps to reproduce

click button, check console.log

What is expected?

no warning

What is actually happening?

I use reactive + toRefs to create a two way data binding. My parent vnode do all the logic, child vnode exists only for dynamic comp rendering.

several questions:

When I send v-model as a complex data structure, everything's fine, except a warning as below, what does that mean?
4

I try to build a simple demo in SFC, the result is just as excepted, but also find something naughty.
5

Why VUE doesn't offically support two way data binding, even though we still have ways to bypass the rule? Are there any side effects to do that?

Also I wish we can change the template before Mounted, so we don't need to face the complexity between parent and children.

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions