React Native app size optimization is easier when you measure each release component instead of guessing which dependency is responsible. This guide presents a repeatable audit for JavaScript, native libraries, fonts, images, and build configuration, with separate checks for Android APK/AAB files and iOS archives. It also includes a simple comparison method so your team can decide whether a size increase is justified before shipping.
Overview
App size has several different meanings. The download size is what a user may need to receive over a network, while installed size is the space occupied after packaging, extraction, and device-specific resources. Store and build reports can also present sizes differently from a local file inspection. For that reason, do not treat one number as the complete result of a React Native app size audit.
Start by establishing a baseline from the same type of release artifact you intend to compare. A development build is not useful for this purpose because it can include debugging code, unoptimized assets, source maps, and development-only dependencies. Build a release configuration for the target platform, record the artifact size, and keep the commit, React Native version, Expo or native build configuration, and enabled features beside the measurement.
The largest contributors usually fall into five groups:
- JavaScript code and its bundled dependencies.
- Native libraries added by SDKs, analytics packages, media tools, or device APIs.
- Images, video, fonts, icons, and other packaged assets.
- Duplicate architectures, language resources, or platform resources included by native packaging.
- Build settings that prevent shrinking, compression, or resource optimization.
Size work should not be separated entirely from performance work. Removing a package may reduce the artifact but introduce slower code or missing functionality. For broader profiling guidance, pair this audit with the React Native performance optimization checklist.
How to estimate
Use a before-and-after calculation for every proposed change. The basic calculation is:
Size change = new release size − baseline release size
For a percentage comparison, use:
Percentage change = (new release size − baseline release size) ÷ baseline release size × 100
Apply the calculation to the same measurement each time: compressed download artifact, uncompressed installed contents, or a platform report. Do not compare an Android APK with an Android App Bundle or an iOS archive with an installed application and call the result a trend.
A practical audit sequence is:
- Build a clean release artifact without changing application code.
- Record the artifact type, file size, commit, build profile, and enabled features.
- Inspect the JavaScript bundle and identify large modules or duplicated packages.
- Inspect native libraries and resources inside the Android or iOS output.
- Review recently added assets and dependencies against the baseline.
- Make one focused change, rebuild, and measure again.
- Run the application on representative devices to confirm that the smaller build still behaves correctly.
For JavaScript analysis, use a bundle analyzer that matches your bundler and React Native or Expo setup. The exact command can change with the project configuration, so treat the analyzer documentation for your installed toolchain as authoritative. The useful output is not merely a visualization; it is a list of high-cost modules, duplicate versions, and unexpectedly included code paths.
Android teams should inspect both an APK used for local device testing and the release distribution format used by their delivery workflow. An APK is a concrete installable file, while an App Bundle is a publishing input from which device-specific APKs may be produced. A local APK number therefore may not represent every user's delivered download. For iOS, inspect the release archive or exported application and compare the packaged resources and linked frameworks. Keep export settings consistent between builds.
Inputs and assumptions
Before deciding whether a change is worthwhile, collect the following inputs in a release-size worksheet:
| Input | What to record | Why it matters |
|---|---|---|
| Platform and artifact | Android APK, Android App Bundle, iOS archive, or exported app | Different formats contain different packaging overhead and resources. |
| Build configuration | Release profile, minification settings, architecture options, and feature flags | A configuration change can look like a code change. |
| JavaScript bundle | Total bundle size and largest modules | Shows the cost of dependencies and import patterns. |
| Assets | Images, fonts, video, icons, and their formats | Media often grows independently of source code. |
| Native dependencies | New SDKs, frameworks, and transitive libraries | A small JavaScript package can bring substantial native code. |
| Comparison scope | Baseline commit, candidate commit, and enabled capabilities | Prevents misleading comparisons. |
Hermes deserves a deliberate check rather than a blanket assumption. Its bytecode and runtime behavior can affect the packaged JavaScript representation, but the final application size also depends on native libraries, assets, build settings, and platform packaging. Measure the actual release artifact with the engine configuration your users will receive. If you change the JavaScript engine, record that as a separate variable and test startup, memory, and compatibility as well as size.
For assets, remove files that are no longer referenced, avoid shipping source-resolution media when a smaller production asset is sufficient, and choose formats based on the platform and the content. Do not repeatedly recompress already compressed files without checking visual quality. Fonts deserve the same review: include only the weights and character ranges the product needs, while preserving languages that the application actually supports.
For dependencies, look for packages used by only one small feature, duplicate versions of the same library, and SDKs enabled in every build when they are needed only in a particular flavor. Tree-shaking and dead-code elimination work best when imports are explicit and the production configuration excludes development tools. Native modules may still contribute code even when a particular JavaScript path is rarely used, so inspect the native output rather than relying only on the JavaScript bundle.
Worked examples
Assume a team has a release APK measuring 48 MB. After replacing several oversized raster images and removing unused font weights, the comparable APK measures 41 MB. The absolute change is 41 − 48 = −7 MB. The percentage change is −7 ÷ 48 × 100, or approximately −14.6%. This is a useful result only if both files use the same signing, release settings, architecture selection, and feature set.
Now consider a bundle analysis that shows the JavaScript bundle grew from 3.2 MB to 4.0 MB after adding an authentication SDK. The bundle increase is 0.8 MB, or 25% relative to the previous JavaScript bundle. That does not mean the application artifact grew by exactly 0.8 MB: compression, bytecode, native libraries, and resource packaging can change the final result. Record the bundle result and the final artifact result as two separate measurements.
A release comparison table can be kept in version control:
| Build | Commit | Artifact | JavaScript bundle | Native/resources notes | Total size |
|---|---|---|---|---|---|
| Baseline | commit A | Release APK | 3.2 MB | Existing analytics and image set | 48 MB |
| Candidate | commit B | Release APK | 3.2 MB | Images and fonts reduced | 41 MB |
| Feature build | commit C | Release APK | 4.0 MB | New authentication SDK | 46 MB |
Use thresholds that reflect your product rather than adopting an arbitrary universal limit. A pull request can require an explanation whenever the release artifact, JavaScript bundle, or packaged assets exceed a team-defined change threshold. The explanation should state what was added, why it is needed, and whether a smaller alternative was evaluated.
When to recalculate
Recalculate React Native app size whenever you add or upgrade a native SDK, change the JavaScript engine, introduce a media-heavy screen, add languages or fonts, change image assets, alter Expo or native build configuration, or enable a new platform capability. Run the audit before a major release and after any build-tool upgrade that changes packaging behavior.
Make the check part of CI/CD rather than a last-minute manual task. A workflow can build a release candidate, save the artifact measurements, run a bundle analyzer, and compare the result with the previous accepted baseline. The React Native CI/CD with GitHub Actions and EAS guide can help place this check in a broader release workflow.
When a build grows unexpectedly, use this order:
- Confirm that the artifact type and build profile match the baseline.
- Review the dependency and asset changes since the last accepted build.
- Analyze the JavaScript bundle for duplicate or newly reachable modules.
- Inspect native frameworks, resource folders, and architecture contents.
- Rebuild after one targeted change and document the result.
- Test installation, startup, navigation, authentication, notifications, and core offline behavior on representative devices.
Size optimization is successful when the measured reduction survives a clean release build without harming reliability or required functionality. Keep the worksheet with each release, refresh its tool-specific commands when the project changes, and treat every unexplained increase as a prompt for investigation rather than a number to ignore.