Skip to content

Creating vnode in computed causes errors. #14288

@Capybara12344321

Description

@Capybara12344321

Vue version

3.5.26

Link to minimal reproduction

https://play.vuejs.org/#eNp9U01v00AQ/SsjX+KoqY0ocDBORIkaCQ6lAsQFI2TsSbKtvbvaDxPJyn9nduw4OdAeEu3OzHvz5u24j261TjqPURbltjJCO7DovIamlLtlETl7KKJVIUWrlXHQg8HtAirVau+wXsCeLgZLhz/uVY1whK1RLcyIcTaB1lQ9xpM0XEJDSheyUtI62KxhCbGew3IFcV6LbrVZZ9fXvU4q5aU75mmIzd+fERwnEImJXw2JU6qTQcdykhjHzNsXEgZY0pWNR8YAtaPm6cgNxOe8kbCPN+sF9FyeXaKO80KGX54OXpExdHHY6oYsoBsA6w8HOv7xzikJH6pGVE9kJjNdXZGhXtcEyNOhgmkYwVZlNIlD6QjB0xQRSWRuNiK0v2gZLeiRCLEVu+TRKkkvycOGdq0WDZov2gnypoiywYaQK5tG/f3MMWc8Lk7xao/V03/ij2EPMjo8GLRoOhI15VxpduiG9N23ezzQeUq2qvYNVb+Q/IpWNT5oHMo+elmT7Is6VvuJt0nI3Xd7dyB/7GmoIDRUHrmeTPMYfHxu9LPcm+QN4+hRycXTZj7/KYQvwRSyxq2QOFLHfQgBCLlHI9ytc8ZmsC0bS+ZRhtaF/s+wB6O0jX/Oxjee/eL8eaHG4oulYnpeK96OPDyrkoSFTFjeKmYqonQ1LggTTgQ02u8OTbCLRrtJ3iav30XHf8NMVjc=

Steps to reproduce

The error appears when clicking the "update" button.

What is expected?

I generated a vnode in computed and then completed the vnode rendering in . I know that passing a function would be a better choice, but itself supports vnode. I just don't understand why the vnode causes an error when it appears in computed.

What is actually happening?

Using the h function does not cause errors, but if using JSX which compiles to createVNode, the error appears. This is a working example: link1 link2.

System Info

Chrome 143.0.7499.170
Windows 11

Any additional comments?

This is my working example, I have tried my best to simplify the logic. This is the non-working example link, and this is the working example(Parent1.vue Transition) link.

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