UtilitiesLoading States
Loading States
The SDK takes a moment to fetch campaign data and render display values. Loading states give you a way to show skeletons or placeholders during that gap so the page does not flicker.
How It Works
- Before the SDK finishes initializing, the
<html>element does not have thenext-display-readyclass. - You apply skeleton styles to elements that need to wait — typically with the
[data-next-skeleton]attribute. - After the SDK finishes its first DOM scan, it adds
next-display-readyto<html>. - Your CSS hides the skeletons (or shows the real content) once that class is present.
This is a CSS-only pattern. There is no JavaScript hook to wait for — the SDK adds the class, and your stylesheet does the rest.