Skip to content

[Performance] Implement lazy loading for Lottie animation JSON files #187

@magic-peach

Description

@magic-peach

Overview

The three Lottie animation files (spinner.json, success.json, upload.json) are imported statically. They should be loaded lazily to reduce initial bundle size.

Implementation

// In LottiePlayer.tsx or parent
const animationData = await import('../lib/lottie/spinner.json')

Or use dynamic imports with React.lazy for the entire LottiePlayer component.

Acceptance Criteria

  • Lottie JSON loaded on demand
  • Initial bundle size reduced
  • No visible loading delay for animations

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions