Skip to content
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

feat(runtime-core): export currentInstance methods #5472

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sibbng
Copy link

@sibbng sibbng commented Feb 22, 2022

Close #4611

Hi, I'm maintainer of reactivue. I rewrote it from scratch and managed to shrink it down to ~150 lines by using EffectScope API. But to support Vue plugins like pinia, @vueuse/head I needed to access setCurrentInstance method.

@netlify
Copy link

netlify bot commented Feb 22, 2022

❌ Deploy Preview for vuejs-coverage failed.

🔨 Explore the source changes: 414cf91

🔍 Inspect the deploy log: https://app.netlify.com/sites/vuejs-coverage/deploys/62220dcdfe83880007903cd6

@netlify
Copy link

netlify bot commented Feb 22, 2022

✔️ Deploy Preview for vue-next-template-explorer ready!

🔨 Explore the source changes: 414cf91

🔍 Inspect the deploy log: https://app.netlify.com/sites/vue-next-template-explorer/deploys/62220dcd35403800073a86e4

😎 Browse the preview: https://deploy-preview-5472--vue-next-template-explorer.netlify.app

@netlify
Copy link

netlify bot commented Feb 22, 2022

✔️ Deploy Preview for vue-sfc-playground ready!

🔨 Explore the source changes: 414cf91

🔍 Inspect the deploy log: https://app.netlify.com/sites/vue-sfc-playground/deploys/62220dcdcb65160008efb80b

😎 Browse the preview: https://deploy-preview-5472--vue-sfc-playground.netlify.app/

@LinusBorg
Copy link
Member

I'm not sure we feel comfortable exposing hooks into these internals.

Can you share a bit more about the use case and what problem this solves?

@sibbng sibbng mentioned this pull request Mar 1, 2022
3 tasks
@crutchcorn
Copy link

crutchcorn commented Mar 1, 2022

@LinusBorg I actually wrote a lot about that here

#4611

That said, how about we export this under a namespace similar to how we export SSR utils?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs further expertise
Development

Successfully merging this pull request may close these issues.

Export "setComponent" in @vue/runtime-core
4 participants