DEV Community

Nishant Mittal
Nishant Mittal

Posted on

Vue SSR Problem

I was making a ssr vue app using gridsome. And I had a loader for the app which got off after I fetched the data from a api. But gridsome is not generating html for the actual content but only for the loading icon. How do I deal with that?

Latest comments (3)

Collapse
 
naimlatifi5 profile image
Naim Latifi • Edited

yeah v-show can do the trick and it will set a display:none to the element

Collapse
 
nishantwrp profile image
Nishant Mittal

Update: I have found a workaround i.e. to not use v-if instead use display: none; to hide the main element.

Collapse
 
marcellothearcane profile image
marcellothearcane

If you aren't, use v-show instead.