You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -339,99 +381,3 @@ Beyond the `scoped` attribute, using unique class names can help ensure that 3rd
339
381
```
340
382
341
383
</div>
342
-
343
-
## Avoid exposing private functions in mixins {#avoid-exposing-private-functions-in-mixins}
344
-
345
-
Always use the `$_` prefix for custom private properties in a plugin, mixin, etc that should not be considered public API. Then to avoid conflicts with code by other authors, also include a named scope (e.g. `$_yourPluginName_`).
346
-
347
-
::: details Detailed Explanation
348
-
Vue uses the `_` prefix to define its own private properties, so using the same prefix (e.g. `_update`) risks overwriting an instance property. Even if you check and Vue is not currently using a particular property name, there is no guarantee a conflict won't arise in a later version.
349
-
350
-
As for the `$` prefix, its purpose within the Vue ecosystem is special instance properties that are exposed to the user, so using it for _private_ properties would not be appropriate.
351
-
352
-
Instead, we recommend combining the two prefixes into `$_`, as a convention for user-defined private properties that guarantee no conflicts with Vue.
0 commit comments