Zum Inhalt springen

React Native v0.80.0-rc in Focus: Key Changes You Should Know About

Hey Devs! 👋

React Native 0.80 is knocking on our doors with its Release Candidate (RC) versions.
Let’s dive into what’s new, what’s been fixed, and what might need some extra love in your projects.

Now with commit links for the curious minds! 😉

Heads-Up! 🚨 (Breaking Changes)

There are always those changes that can break things. Keep an eye on the following:

  • Revamped Welcome Screen: The default NewAppScreen has been redesigned and moved to react-native/new-app-screen (3cf0102007).
  • Stricter Imports: With the introduction of "exports" in package.json (319ba0afd2, 9fc2a9b9e6), importing from internal folders (e.g., react-native/Libraries/...) may no longer work. Stick to official paths! Direct imports from react-native/virtualized-lists are now blocked (be8393c41b).
  • Component Naming: New ESLint rule (via eslint-plugin-react-hooks v5.2.0): component names can no longer start with _ (4de592756b).
  • Android Devs: Lots of modules are now Kotlin! 🤖 If you extended classes like ReactEditText (cac27d15be), NetworkModule (8726e26348), ReactTextInputManager (ab47834eb1), DevSupportManagerBase (9da485b54c), or ReactInstanceDevHelper (09492075e8), you may need to adjust method signatures. Classes like ModuleDataCleaner (6fa1864d52) and DeviceInfoModule (f02607badb) are now internal. ChoreographerCompat (f8b2956437) and StandardCharsets (40b38d0a44) have been deleted. The loadSplitBundleFromServer function was removed from the DevSupportManager interface (86cd31eb6b).
  • iOS Devs: Configuration helpers like BridgeModuleBatchDidComplete were deleted (cbad8aafa5).

New Toys! 🎁 (Features)

New stuff is always exciting!

  • Stricter TypeScript (Optional): Introducing react-native-strict-api (6ea24f7bb9). Opt-in for enhanced checks.
  • Improved <Image> Support: crossOrigin and referralPolicy headers now supported via source.uri (49ea9d80b8).
  • Radial Gradients: Finally! ✨ (1b45dc8033).
  • Extended CSS Color Support: Includes hwb() notation (692b05e77d) and rgb(R G B / A) (7441127040).
  • Legacy Architecture Warning: A warning is shown if the app runs on the old architecture (706b6e878d).
  • ESLint Rule no-deep-imports: Helps prevent unsafe internal imports (87809d9326).
  • Native URLSearchParams: Core-level query string parsing (af1f1e4fe5).
  • Improved Accessibility: New accessibilityOrder prop for Android and iOS (8cf4d5b531).
  • New onPressMove on Pressable: More gesture control (6df938c72e).
  • EventEmitter APIs: addListener and removeListener now exposed (ff4537c15e).
  • compact Option in Babel Preset: Can now disable whitespace removal (86911003dc).
  • Codegen Utilities Exposed: Codegen functions and types moved to the package root (c7aa3f3fe7).
  • Android-Specific: New prop screenReaderFocusable (4ce093154d), legacy component warning with YogaMeasureFunction.measure() (9345c88a61), new prop to filter drag-and-drop in TextInputs (d10dd7130c).
  • iOS-Specific: New accessibility props: accessibilityLabelledBy, accessibilityDescribedBy, accessibilityHint (5b5cf0e199).

Bug Cleanup! 🧹 (Fixes)

Bugs? Not today. Here are some key fixes (for commit details, see the original changelog):

  • General: Timers (setTimeout, etc.) now align more closely with web standards. Improved TypeScript typings, generic support for VirtualizeSectionList, controlled state for Switch, better ListEmptyComponent rendering, font scaling, and outline-offset handling.
  • Android: Focused fixes for TextInput (focus, rendering, keyboard nav, double-selection), layout issues (RTL borders, clipping, keyboard navigation), crashes (parent state, event emitters), null safety, content:// URI fetch, keyboard focus.
  • iOS: View additions via interop layer, multiline text measurement, ScrollView interactions (betterHitTest), crashes in RCTPullToRefreshViewComponentView, inline views with truncated text under New Architecture.

Farewell… 👋 (Deprecations & Removals)

Some items are on their way out:

Android:

  • ReactContextBaseJavaModule.getCurrentActivity() is deprecated (1408c69fd8).
  • UIManagerType.DEFAULT is deprecated (use LEGACY) (a8668319ad).
  • ResourceDrawableIdHelper.instance has been removed (8de401c625).
  • The constructor EventBeatManager(ReactApplicationContext) has been removed (c97af95a7f).
  • FabricSoLoader is no longer part of the public API (902f82656e).
  • (un)registerEventEmitter has been removed from the EventDispatcher interface (d1c0f57073).
  • TouchesHelper is no longer part of the public API (2196597e2b).

iOS:

  • loadImageForURL is deprecated (use the new signature with completionHandlerWithMetadata) (43c9a609de).
  • RCT_NEW_ARCH_ENABLED and RCTSetNewArchEnabled are deprecated (6dd721b258).
  • RCTComputeScreenScale (094876367f) and RCTFloorPixelValue (dc97df10a2) have been removed.

Under the Hood ⚙️ (Other Changes)

In a Nutshell 🎶

That’s it! React Native 0.80.0-rc brings a bunch of refinements, continues the Kotlin migration on Android, introduces cool new features (hello, radial gradients!), and fixes several bugs. If you’re interested in diving deeper, the commit links are there for you to explore!

Keep a close eye on the breaking changes, especially if you have custom native code or rely on internal imports. Now it’s time to test and prepare your apps. Happy coding, everyone! 🚀

Stay Tuned! 👀

This review covers everything up to version v0.80.0-rc.3.
As new RC versions are released, I’ll update this post so we can all stay up to date with the latest changes—sound good?

And just a quick behind-the-scenes note: I used a bit of AI help to initially filter and organize the massive changelog. Then, of course, came the human touch—to refine, simplify the language, and make sure everything makes sense for our day-to-day development. 😉

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert