F
F
f1nef1ne2017-09-13 12:20:02
Vue.js
f1nef1ne, 2017-09-13 12:20:02

How to get rid of element flickering on page load using v-if in Vue.js?

Good day.
Faced this kind of problem, like the flickering of an element on the page that I want to hide using the v-if parameter in the Vue.js library. Same problem with v-show.
That is, when the page loads, the element is displayed literally for 1 second, and then disappears. How to make it so that it was not initially visible on the page, but only appeared when the value was true?
In addition, the variable that v-if takes is initially set to false.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2017-09-13
@f1nef1ne

Remove component template from element in X-Template

A
Alexander, 2017-09-13
@boratsagdiev

Try putting v-cloak where you put v-if
https://vuejs.org/v2/api/#v-cloak

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question