Dynamic import() loads modules on demand: const module = await import('./heavy');. This reduces initial bundle size. In the sandbox, simulate lazy loading with a factory function that defers computation.
π‘ Hints (5)
β’ Use a closure to maintain the cached state
β’ Check if cached is null before calling the factory