Most of the times when we want to create a variable to be used in a vue file, we will create a property in the data() function. But, if we don’t want the property to be reactive, then we’d have to create a private variable or a variable that is not reactive.
private variables
3 different ways to access constants in a Vue template
In this post, I’ll show how to access a constant in the vue <template>
tag.
If we consume the constant directly in the vue template we’ll get an error when compiling the app.