Skip to content
Performance·Advanced·Conceptual·1 min read

What happens if a lazy-loaded chunk fails to load, such as from a network error?

Short interview answer

The dynamic import's promise rejects, and without explicit handling this can crash the surrounding component tree; production code typically wraps lazy boundaries in an error boundary that offers a retry rather than a blank broken screen.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Code splitting and lazy loading

Related questions