Why SwiftUI

Why render your iOS interface with SwiftUI, and why still write it in React.

React Native already draws native views, so why bring in SwiftUI? Because on iOS, more and more of what makes an app feel native now exists only in SwiftUI.

Apple's new interface ships in SwiftUI

For years, a React Native view and a UIKit view were close enough. That stopped being true once Apple started shipping its new design language and controls in SwiftUI first, and sometimes only in SwiftUI.

Liquid Glass shows this best. Its effects are SwiftUI modifiers, like glassEffect, backgroundExtensionEffect, scrollEdgeEffectStyle and tabViewBottomAccessory. To use them, an app has to render with SwiftUI. Redrawing them in JavaScript only gets you an approximation, and it falls further behind with every iOS release.

Because this library is generated from the SDK, new APIs like these appear as soon as the generator runs against an Xcode that has them. Nobody has to notice them and write a wrapper first.

The real thing doesn't drift

A control redrawn in JavaScript is a copy of a moving target. You get the shape right, and then you have to match:

  • Its springs and timing curves, and how they change between iOS versions
  • Dynamic Type at every text size, including the accessibility sizes
  • VoiceOver labels, traits and actions
  • Haptics, dark mode, increased contrast and reduced motion
  • Edge cases such as long labels, right-to-left languages and keyboard focus

SwiftUI already does all of this, because Apple maintains it. When you render the real view, all of that comes with it, and it stays correct when iOS changes.

Why still write it in React

SwiftUI is a great way to draw an interface. React is a great way to build an app around it. This library tries to give you both.

  • Your app stays one codebase. Navigation, data fetching, state and business logic stay in TypeScript, next to everything else your team already has.
  • Your tools still work. Fast Refresh, your component patterns, your tests, your packages and your types all keep working.
  • You can adopt it gradually. SwiftUI views and React Native views share one tree, so you can replace one screen, or one control, at a time.
  • You learn SwiftUI as you use it. The API uses Apple's names and argument labels, so Apple's documentation and WWDC sessions apply directly. Read Reading the reference for how the names map.

When it isn't the right fit

  • You need the same UI on Android. SwiftUI only exists on Apple platforms. You'd need a separate implementation for Android.
  • You're drawing a fully custom interface, like a game or a canvas-heavy editor, where system controls don't matter. Plain React Native views or a graphics library will serve you better.
  • You're on the old architecture. The library depends on Fabric and the New Architecture, and has no fallback.