dynamicImport wraps React.lazy-style loading for route segments, tabs, and heavy widgets. It trades a loading flash for smaller initial bundles—critical in dispatch where supervisor and analytics modules can dominate bundle size if eagerly imported.
When to use
Route-level or tab-level boundaries where code is not needed on first paint (analytics dashboards, infrequent admin tools).
Heavy third-party or chart bundles isolated behind user intent.
Scenarios where startup time and memory on lower-end operator machines measurably improve.
When not to use
Tiny leaf components—static imports simplify stack traces and avoid waterfall churn without measurable win.
Critical-path UI needed within hundreds of milliseconds of navigation (911 primary consoles)—measure before lazy-loading.
Shared primitives imported everywhere—dedupe into core chunks instead.
Variants
Loading fallbacks should be lightweight (LoadingIndicator, minimal skeleton). Error UI should offer retry and report through the observability pipeline.