React Native 0.80 Overhauls JavaScript API: Deep Imports Deprecated, Strict TypeScript Arrives

By
<p>React Native 0.80 is rolling out two major changes to its JavaScript API that signal a shift toward a more stable and type-safe development experience. The update deprecates deep imports from the <code>react-native</code> package and introduces an opt-in Strict TypeScript API, marking the beginning of a long-term effort to formally define the framework's public interface.</p><p><strong>Immediate action required for developers:</strong> Deep imports—such as <code>import {Alert} from 'react-native/Libraries/Alert/Alert'</code>—now trigger deprecation warnings in ESLint and the JavaScript console. Developers are urged to migrate to root imports like <code>import {Alert} from 'react-native'</code>. The team plans to remove deep import paths entirely in React Native 0.82.</p><p>Meanwhile, an opt-in Strict TypeScript API provides stronger type accuracy and a new public API baseline generated directly from React Native's source code. This is a one-time breaking change designed to future-proof typings, and it is enabled via <code>compilerOptions</code> in <code>tsconfig.json</code>.</p><h2 id='background'>Background</h2><p>React Native's JavaScript API has historically been loosely defined. The framework is authored in Flow, but the developer ecosystem overwhelmingly uses TypeScript. Community-contributed types, while appreciated, lacked automated tooling and introduced correctness gaps. Additionally, internal paths like <code>react-native/Libraries/</code> were accessible from app code but changed with internal updates, creating instability.</p><figure style="margin:20px 0"><img src="https://picsum.photos/seed/2427798709/800/450" alt="React Native 0.80 Overhauls JavaScript API: Deep Imports Deprecated, Strict TypeScript Arrives" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px"></figcaption></figure><p>According to the React Native team, these issues have made it difficult to guarantee API stability. The 0.80 release directly addresses both problems: deprecating deep imports reduces the surface area to a controlled set of exports, while the Strict TypeScript API provides a verified baseline.</p><h2 id='what-this-means'>What This Means</h2><p>For developers, this is a transitional phase. The deprecation warnings give time to update imports, but the eventual removal of deep imports will break code that relies on them. A feedback thread has been opened for APIs not yet exposed at root level.</p><p>The Strict TypeScript API is currently opt-in, but the team plans to enable it by default in a future release. This will enforce stricter type checking and align React Native's public API with modern TypeScript practices. Experts see this as a necessary step to reduce fragmentation and improve library compatibility.</p><p><em>“These changes represent the groundwork for a stable React Native API that developers can rely on across versions,”</em> said a React Native core contributor. <em>“We're working with the community to finalize the export list before making the Strict TypeScript API the default.”</em></p><p>In summary, React Native 0.80 requires immediate attention from developers using deep imports and offers a preview of the type-safe future. The full transition is expected over the next two releases.</p>
Tags:

Related Articles