-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Description
Some data that is being kept track of by a component does not need to be made reactive. Currently, there is no one place to organize private data like that. Values stores in data, even if prefixed with underscore (e.g., _privateStuff), get methods added for every key of the object. I would like a dedicated space designated by Vue for private data and functions that will not be made reactive. I realize that I even now can create something like private or _private but there is no guarantee that it will not clash with Vue's future development.
It would be great to have a $private namespace allocated. It can be populated from private key of the component configuration object:
{
data: function () {...},
props: {},
methods: {},
private: {
// private variables that are not made reactive and are not watched
}
}