React Native

React Native: Monorepo Magic and Text Selection Revival

Today's episode covers 9 commits focused on making React Native play better with monorepos and improving text handling. The biggest story is a crucial Gradle fix for monorepo setups and the revival of text selection with the new prepared text layout system. Plus, we see continued migration to modern Flow syntax and some helpful developer tooling improvements.

Duration: PT4M1S

https://podlog.io/listen/react-native-b1306806/episode/react-native-monorepo-magic-and-text-selection-revival-909edc8b

Transcript

Hey there, React Native developers! Welcome back to another episode. I'm your host, and wow, do we have some interesting changes to dive into today. February 18th brought us 9 solid commits that show the React Native team really listening to the community's needs.

Let's jump right into the biggest story of the day - monorepo support just got a whole lot better! Thibault Malbranche landed a fantastic fix that addresses a real pain point many teams have been hitting. You know how React Native's Gradle setup was hardcoded to look for properties at a specific relative path? Well, if you're working in a monorepo where your Android apps live under different package structures, that just... didn't work.

Here's what was happening: React Native was only checking for gradle.properties at exactly "../../android/gradle.properties" - super rigid, right? But in monorepos, your structure might be "packages/my-app/android" or something completely different. Thibault's fix is elegant - it now checks the parent Gradle parameters first, then falls back to the old path for backward compatibility. This means features like Hermes V1 can finally be inherited correctly in monorepo setups. And get this - he mentions the code was generated using GPT-5.3 Codex, which is pretty cool to see AI assisting with these kinds of infrastructure improvements.

Speaking of infrastructure, we've got another Android improvement from Fabrizio Cucci around clipToPadding behavior. This one's more under the hood, but it's about making sure Android's input systems can properly identify which views are clipping their content. It's behind a feature flag for now, but it shows the team's attention to those platform-specific details that make apps feel native.

Now here's something that caught my eye - Nick Gerleman has been working on bringing text selection back to the new prepared text layout system. This is fascinating because it shows how complex seemingly simple features can be. The new PreparedLayoutTextView is faster and more efficient than the old TextView, but it broke text selection. Nick's solution? A hybrid approach with a new NativeSelectableText component that smartly chooses between the optimized path and the selection-capable path based on what you need.

The development process continues to evolve too. Fabrizio has been systematically migrating example components from the old function syntax to modern Flow component syntax. Today we saw updates to FlatList and Animated examples. This might seem like busy work, but it's actually really important - it ensures the examples developers learn from are using current best practices.

We also got some nice housekeeping improvements. Jakub Piasecki moved some iOS-specific helpers to the proper platform directory - the kind of organizational work that makes the codebase easier to navigate. Phillip Pan upgraded the undici dependency to address security vulnerabilities, and Nicola Corti introduced a shared HTTP client singleton to reduce resource waste in dev tools.

Even small fixes matter - Fabrizio caught and fixed some typos in feature flag comments. It's these little touches that show a team that cares about code quality at every level.

Today's Focus: If you're working in a monorepo setup, definitely keep an eye out for this Gradle fix in your next React Native update - it could solve some headaches you didn't even realize you had. And if you've been waiting to use the new text layout optimizations but needed text selection, Nick's work is paving the way for having both performance and functionality.

The theme I'm seeing across all these changes is flexibility - making React Native work better in different project structures, different use cases, and different performance scenarios. That's exactly what a mature framework should be doing.

That's a wrap for today! Keep building amazing things, and I'll catch you in the next episode where we'll see what the React Native team has been cooking up. Until then, happy coding!