-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
[Vue 2.7] [Vue warn]: Avoid using variables that start with _ or $ in setup(). #12975
Comments
They are just warnings and do not affect behavior. see #12587 |
But, in the reproduction I presented, variables that start with $ actually didn't setup to the component |
This happens to me when i upgrade Nuxt 2 to Bridge version, which also uses Vue 2.7.x |
I forked the above sandbox and add both options API and composition API cases, they're not working |
I have gotten a similar issue when using async setup(). Pretty much no other code. Don't use async in the setup, no issue, use async in setup, issue. |
Lines 12 to 15 in bed04a7
This line of the Lines 62 to 66 in bed04a7
|
any update? |
Version
2.7.3
Reproduction link
codesandbox.io
Steps to reproduce
$config
What is expected?
Variables that start with $ setup to component.
What is actually happening?
This behavior only exists in Vue 2.7.x, which is different from both Vue 3 & @vue/composition-api. For example, in this Vue 3 reproductions, it's okay:
https://sfc.vuejs.org/#eNp9kc9qhDAQxl9lCAVdUAM9igqll75BL7lYHbcu5g+TaA+Sd+9kd11KCz0l8+WbH/NNdvHiXLWtKGrR+IFmF8BjWF2nzKydpQA7EE4FDFa7NeAIESayGjJuypRRZrDGB3jiY5rP0CZ3nr3hslh4t7SMz9npMD08ByzPT9B2R3O19cuK7G7kbRQegouA2i19QK4AmnHeYB5bJXrnlLhqrLpu3w98jI1M87Ms2c23Rj4YohC3XKXuXXXx1nDyPZnV/cErUcNVSRqnTLUSnyE4X0vppyHt6+IrS2fJt4pWE2aNFXpdfpD98kgMVqL4wZAsbkgloRmRkP5j/rL+4SZsVCZylFfe4/33RPwG5f6dbg==
The text was updated successfully, but these errors were encountered: