Using closures in JavaScript to create private variables

Problem statement JavaScript objects are really just a collection of properties. Using either the object literal syntax or a constructor, objects can be created and properties can be added with ease. Here is a code sample: Each of these methods gives us the same result. We have a new object that has firstName and lastName...

4 ways to call a function in JavaScript

Functions in JavaScript can be called in different ways. At first glance, that may seem like a crazy statement. How can there be more than one way to call a function? Don’t we just call it? Well, dear reader, as we shall discuss in this post, there are 4 ways to call a function in...

Filtering Data in Vuex

Like most challenges in software development, there’s usually more than one way to implement a solution. Filtering data that resides in Vuex is no exception. This is only one potential implementation. Depending on your situation, this may or may not be applicable. For me, it worked out just fine.  The Setup I have this sample...

Examining the Vue render function

If you’re using the Vue CLI to scaffold you VueJS projects (and if you aren’t, you should be) you’ve surely noticed that when you create a new project it will generate a number of files for you. One of these being main.js. If you open up main.js you will find something similar to the following: After...

Solving the “You are using the run-time only build of Vue” error

So you downloaded all the latest bits of Vue and you’re ready to get started building the next Amazon.com. Just to be sure you’re on the right track, you fire up your development server and browse to localhost:8080 and….nothing. After a couple of chin scratches and an audible groan you pop open dev tools in...