Subscribe on changes!

Allow inject after asynchronous function outside setup()

avatar
Nov 10th 2021

What problem does this feature solve?

Currently it's impossible to access inject outside an async setup() but that does originated from a setup()

sfc demo

The warning from Vue inject() can only be used inside setup() or functional components. is pretty telling here, but the fact that inject after an async function works inside the setup() but not directly outside the setup from a function called within setup might be a great addition?

What does the proposed API look like?

/