Skip to content

Writing renderless components with <script setup> syntax #12281

@dmitriykorobkov

Description

@dmitriykorobkov

What problem does this feature solve?

For now, there isn't any possibility to write <script setup> SFC without template. I have to write old syntax setup function with return () => null;
I'm using renderless components for modifying behavior of components, which contains first ones as slots.

What does the proposed API look like?

I think, nothing should be changed. If there is no <template> section, compiler infer () => null as render function.

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