Mobile Development

React Native 0.87 Arrives With Default Strict TypeScript, Experimental Swift Package Manager, and Major Toolchain Updates

The React Native core team has officially announced the release of version 0.87, introducing significant foundational updates aimed at modernizing developer tooling, enforcing stricter typing ecosystems, and streamlining native dependency management across iOS and Android platforms. As the latest stable release, version 0.87 transitions the Strict TypeScript API to the default JavaScript interface, updates the Metro bundler to version 0.87, brings experimental Swift Package Manager (SwiftPM) support to iOS, and raises minimum toolchain requirements to Node.js 22, Android Gradle Plugin 9, and Kotlin 2.0+.

This release marks a pivotal step in the ongoing evolution of the cross-platform framework, balancing developer experience with modern architectural standards. With version 0.87 now occupying the latest stable position, support for older iterations—specifically version 0.84.x—officially concludes in accordance with the project’s support lifecycle policy.

Enforcing Type Safety: Strict TypeScript API Becomes the Default

The most visible change for application developers in React Native 0.87 is the transition of the framework’s public JavaScript API to the Strict TypeScript API. Originally introduced as an opt-in preview in version 0.80 alongside the deprecation of deep imports, the strict configuration is now standard for all newly initialized and upgraded projects.

This ecosystem-wide transition introduces deliberate breaking changes across the API surface, designed to eliminate ambiguous typing and drastically improve autocompletion, inline documentation, and error detection within integrated development environments (IDEs). For instance, hovering over core components like TextInput now reveals rich symbol documentation and comprehensive type information, replacing the uninformative hover states of legacy types.

To assist developers in navigating the shift, the core team collaborated closely with community partners to finalize root exports and resolve compatibility issues with widely used third-party libraries. While many applications are expected to upgrade with minimal friction, a dedicated migration guide and automated ESLint fixers are available. Furthermore, agent-driven workflows can leverage the specialized /migrate-to-strict-api skill to streamline large-scale codebase transformations.

Recognizing that complex enterprise applications may require additional time to adapt, the core team has implemented a temporary opt-out mechanism. Developers can revert to legacy typing by incorporating the "react-native-legacy-deep-imports" custom condition within their tsconfig.json file. However, this bridge is strictly temporary and will be deprecated entirely in the subsequent 0.88 release, after which legacy types will be permanently removed.

React Native 0.87 - Strict TypeScript API, Metro Update, Swift Package Manager, AGP 9 Support

Streamlining iOS Infrastructure with Experimental Swift Package Manager Support

On the Apple ecosystem front, React Native 0.87 introduces experimental support for the Swift Package Manager (SwiftPM) as an alternative to CocoaPods. Designed to be entirely opt-in and additive, the new integration path consumes the identical prebuilt XCFrameworks published by the framework, leaving CocoaPods fully functional as the default standard.

Historically, iOS dependency management in React Native required Ruby, Bundler, and CocoaPods configurations. The SwiftPM integration simplifies this pipeline by relying exclusively on Xcode. Developers can transition an existing workspace by executing a single command—npx react-native spm --deintegrate—which non-destructively injects Swift package references directly into the existing .xcodeproj file without altering project signing, capabilities, or build phases. Reversing the operation is equally straightforward via the npx react-native spm deinit command.

A notable operational benefit of the SwiftPM implementation is the elimination of repetitive post-installation steps. Unlike traditional CocoaPods workflows that necessitate running pod install following every modification to native dependencies, the SwiftPM integration automatically detects changes and executes autolinking dynamically during the standard build process.

To achieve seamless compatibility with SwiftPM’s stringent requirements regarding XCFramework structures and header locations, the core team restructured the distribution of React Native’s precompiled binaries. This restructuring includes the introduction of dedicated headers-only frameworks, standardizing search path mechanics and assigning every namespace a unique physical location. While internal header content remains byte-identical to previous versions, developers utilizing bare-form angle includes must update their imports to include explicit namespaces, transforming statements such as #import <RCTAppDelegate.h> into #import <React/RCTAppDelegate.h>.

Elevating Android Builds Through Android Gradle Plugin 9

For Android developers, React Native 0.87 delivers foundational compatibility with the Android Gradle Plugin (AGP) version 9. As a major release introducing substantial API and Gradle build alterations, AGP 9 adoption requires specific configuration adjustments to maintain stability during the transitional phase.

To ensure a smooth upgrade path, the core team recommends explicitly opting out of built-in Kotlin and the new Domain-Specific Language (DSL) behavior introduced with AGP 9. Developers can implement this by appending specific flags—android.builtInKotlin=false and android.newDsl=false—to their android/gradle.properties files. These temporary opt-outs are projected to phase out in upcoming AGP 10 releases as the broader Android ecosystem finalizes its adoption.

React Native 0.87 - Strict TypeScript API, Metro Update, Swift Package Manager, AGP 9 Support

Performance Enhancements and Toolchain Modernization

Accompanying these architectural shifts is an upgrade to the Metro JavaScript bundler, moving from version 0.84 to 0.87. This iteration focuses on performance optimizations, reduced memory overhead, and faster incremental build times, aligning with the framework’s broader objective of delivering a leaner development loop.

Concurrently, the minimum toolchain requirements have been elevated to reflect modern software standards. React Native 0.87 officially mandates Node.js 22, Android Gradle Plugin 9, and Kotlin 2.0 or higher. These elevated baselines allow the core maintainers to leverage modern language features, enhance security postures, and remove legacy compatibility layers that previously contributed to framework bloat.

Community Collaboration and Upgrade Pathways

The release of React Native 0.87 is the collaborative product of 265 distinct commits contributed by 74 community members, reflecting the active engagement of the global open-source ecosystem.

For developers preparing to transition existing codebases, the official React Native Upgrade Helper remains the primary resource for visualizing code differences between versions. New project initialization can be executed via the updated command line interface using npx @react-native-community/cli@latest init MyProject --version latest, while projects within the Expo ecosystem can anticipate integration via upcoming expo@canary releases.

As React Native continues to refine its underlying architecture across both mobile operating systems, version 0.87 establishes a more robust, type-safe, and natively aligned foundation for cross-platform application development.

Related Articles

Back to top button