Private variables in VueJS

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.

3 different ways to access constants in a Vue JS 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.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now