• React Native 0.72 introduces beta support for package.json “exports” field in Metro. • Enables React Native projects to work seamlessly with a wider npm ecosystem. • Packages can now expose platform‑specific entry points for React Native. • “exports” replaces or augments “main”, defining importable subpaths. • Only paths listed in “exports” are importable, improving encapsulation. • Some edge‑case resolution changes may break existing imports.

Article Summaries:

  • React Native 0.72 introduces beta support for the npm package.json “exports” field via Metro. This change lets packages define precise entry points, subpath aliases, and conditional exports for different runtimes (node, browser, react‑native). The update improves out‑of‑the‑box compatibility with over 16,000 npm packages, gives authors a standardized API for multi‑platform packages, and enables React Native for Web projects to use the “browser” export without workarounds. Developers can enable the feature today, with packages such as Firebase and Storybook already benefiting, though some edge‑case breaking changes may affect specific projects. The feature is slated to become the default in a future release.

Sources: