vue
vue copied to clipboard
chore(warn): include key name in inject() usage warning
- This PR improves the developer warning message in inject() when used outside setup() or functional components.
Before:
inject() can only be used inside setup() or functional components.
After:
inject("userStore") can only be used inside setup() or functional components.
-
This makes it easier for developers to identify which injection key caused the warning.
-
solves issue #13287