FRONT008warningPro

loading-returns-null

Returning null during loading causes layout shift and flash of empty content.

Applies to: JavaScript, TypeScript

Why this matters

When a component returns null while loading, it renders nothing — causing the layout to shift when content appears. This is jarring for users and can hurt CLS (Cumulative Layout Shift) scores. Return a skeleton or placeholder instead.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, FRONT008 includedstablestack explain FRONT008

FRONT008 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: FRONT008