A bloated app is a slow app. Large bundle sizes lead to longer download times and slower "Time to Interactive" on older devices.
1. Analyze Your Bundle
Use react-native-bundle-visualizer to see exactly which libraries are taking up the most space. You might be surprised to find that a small utility is bringing in a massive dependency.
2. Tree Shaking & Modular Imports
Ensure you are only importing the parts of a library you need.
import { map } from 'lodash'; is much better than import _ from 'lodash';.
3. Optimize Assets
Images are often the biggest culprit. Use the AVIF format and serve different resolutions based on the device's screen density (pixel ratio).
4. Native Modules over JS Polyfills
Whenever possible, use a native module (e.g., for date formatting) rather than a heavy JavaScript polyfill.
A lean app is a fast app, and users notice the difference.