React Native Blog Jun 12, 2025

Moving Towards a Stable JavaScript API in React Native

Article Summary

React Native 0.80 is making a bold move: deprecating deep imports and introducing auto-generated TypeScript types. This is the foundation for a truly stable API.

The React Native team at Meta is tackling a long-standing problem with their JavaScript API. Historically, types were manually maintained by the community and internal imports were accessible but unstable. Now they're drawing clear boundaries around what's public and what's private.

Key Takeaways

Critical Insight

React Native is finally defining a stable public API by deprecating deep imports and offering auto-generated TypeScript types that guarantee accuracy with the source code.

The article reveals why Meta still uses Flow instead of TypeScript for React Native, and it's all about scale and correctness.

About This Article

Problem

React Native's JavaScript API didn't have clear boundaries between public and internal code. Apps could import directly from react-native/Libraries/, but these internal paths changed frequently as the team updated the codebase, making apps break unexpectedly.

Solution

Meta's React Native team discouraged deep imports by adding ESLint rules and console warnings. They also generated TypeScript types from Flow source code that only expose what's in index.js, which prevents access to internal modules.

Impact

Changes inside React Native's codebase won't break apps anymore because the public API is now limited to what index.js exports. The team plans to remove deep imports entirely by version 0.82.