As for Vue to make preloader page?

I tried to Google, but do not understand.
I have a page whose data is drawn from vuex, vuex, in turn, pulls data from the API. Then on the page moved response with an array of symbols, loaded the symbols.

How can I do so that will not occur until receipt of the response from the API until you see the pictures is to show the preloader?

And to say it as simply as possible. It is hard for me to understand all of it.
June 3rd 19 at 19:00
2 answers
June 3rd 19 at 19:02
And what's the problem?
Do some variable flag, for example, is loaded, which is initially false, and after the data load is set in true. And template, respectively, when loaded shows the images, otherwise the preloader
The problem is, how can I track the download. - sofia.Maggio commented on June 3rd 19 at 19:05
how you load the data? - Annabel_Hodkiewicz3 commented on June 3rd 19 at 19:08
using vuex, there is described the action loadPosts, in the component describe the following:

created () {
computed: {
 getPosts () {
 return this.$store.getters.posts


loadPosts ({ commit }) {
 .then(r =>
 .then(posts => {
 commit('SET_POSTS', posts)
- sofia.Maggio commented on June 3rd 19 at 19:11
well here's your commit and will mean that it is time to change the flag - glennie_Mer commented on June 3rd 19 at 19:14
June 3rd 19 at 19:04

Find more questions by tags Vue.js