Skip to content

Why is there no expose property on the component instance? #13112

@atox996

Description

@atox996

Vue version

latest

Link to minimal reproduction

https://play.vuejs.org/#eNp9Ul9LwzAQ/yolL91gtIzpyygDlT0oosP5ZkRKe+uytUlIrrUy9t29pLQbOPdSevf7w+8ud2B3WkdNDWzOEpsZoTGwgLVecCkqrQwGD6rSwcaoKgij2BWOHnKZKWlVCVGpipFrj7lM4s6CxFQgVLpMEagKgmQ7XTwrtSc7L0tiajjFGYtNGFqy3Ygi2lklKdPBaTnLyF+UYF41CtJzNg884rC0LNX3k++hqWHS97MtZPsL/Z1tXY+zlQELpgHOBgxTUwB28HL9Ai39D2Cl8rok9hXwDWi22mXsaPe1zCn2Gc+nffSbFbJ4t8sWQdp+KBfUMY+ezxlt2q32v9FPcWfRjddxeaQt9q904VFz2AgJK6O0HXkfmVYwWOKPpmKNhrL1fvSunWhZCbSjjzDbprKA8PMEtFpZ6OwQLI7Gvd/5jYQOCkk02F47l1w0iyR2379H8tWAcSuj8WbRbTSdseMvmnvuRQ==

Steps to reproduce

Image

What is expected?

includes expose

What is actually happening?

When inspecting a Vue component instance via console.log, I found that its prototype contains properties like emits, props, render, and setup, but there is no expose.

Why is that? If expose were also available on the component instance, it would make it much easier to re-expose the internals of a wrapped component when creating higher-order components.

Was this an intentional design choice?

System Info

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