Loading data from an API using the Vue.js life cycle
It is common for most of the applications that are built for the web to expose a level of dynamic content. Providing the ability to load information on the fly has been one of the most important factors that led to the growth of JavaScript frameworks, such as Vue.js.
Until now, the Companion App has been built using static data that is loaded directly within the components. Hardcoded values are not very common in real applications, and the posts and comments used within the application were just a stopgap to help us focus on the basic features of Vue.js, but it is now time to learn how to load data dynamically.
Being able to successfully handle asynchronous data load is very important. No matter how big or small your next application will be, it is very likely that you will be required to handle external data.
In this section, we are going to update two parts of our application. First, we are going to update SocialPosts...