DEV Community

Discussion on: The Loading Shimmer!

Collapse
 
perlatsp profile image
Perlat Kociaj

Thank you for sharing this awesome tip Dhilip.
In a real world example, how would you make it work. Display the shimmer while the content is loading and as soon as the content loads you set ‘display:none’ or remove it from the DOM

Collapse
 
dhilipkmr profile image
Dhilip kumar

Avoid using 'display: none' if that Part of the element is never gonna be shown in the future.

In our case, once the data loads we might not need to have the shimmer in the DOM. So remove it conditionally :)