History

Where swiftui-react-native came from, what held it back, and why it was rebuilt.

swiftui-react-native has been around since 2020. Its goal has always been the same: let React developers use the best of SwiftUI. What changed is how close each version could get.

2020: SwiftUI's shape, in React Native

Andrew Levy started the project in November 2020. As its first README put it, "SwiftUI is awesome. So is React Native!" The first versions gave React Native SwiftUI's vocabulary: VStack, HStack, ZStack, Spacer, List, TabView and modifiers passed as props. The views themselves were React Native views, arranged to behave like SwiftUI's.

That made it easy for SwiftUI developers to get started in React, and vice versa. But it wasn't SwiftUI. Only the names were.

2024: real SwiftUI

Version 6, in May 2024, made the big change: the views became real SwiftUI. Each one was a native module built on Expo Modules. Its SwiftUI view ran inside its own UIHostingController, and React passed modifiers to it as props:

<VStack alignment="leading" background="blue" padding={{ leading: 30 }}>
  <Text font="title">Some cool text</Text>
  <TextField text={text} placeholder="Name" />
</VStack>

It worked, and it showed the idea was right. It also introduced useBinding, which is still how you bind controls to state today. Several contributors helped grow it, and its last update came in late 2024.

What held it back

Version 6 hit two limits that more work couldn't fix.

Every API was written by hand. Each view needed a Swift view, a props type, a native module and a TypeScript wrapper, all kept in sync manually. The library covered a few dozen views and a small set of modifiers. SwiftUI has hundreds of each, and Apple adds more every June. A hand-written library can't keep up with that.

Every view was its own island. Each component hosted its own SwiftUI tree. React children placed inside one weren't part of that SwiftUI tree: they were wrapped in extra views, and sizes had to be estimated and passed across. That made layout fragile exactly where the two worlds met, which is where a library like this most needs to be solid.

Then in 2025 Apple introduced Liquid Glass, along with a wave of new SwiftUI-only APIs. Writing a wrapper for each one would never catch up.

2026: rebuilt to keep up

So we picked the project up again and rebuilt it from the ground up, keeping the parts that were right: the name, the goal, SwiftUI's vocabulary and useBinding. Everything underneath changed.

  • It's generated. A generator reads Apple's SDK and writes the components, modifiers, value types, TypeScript definitions and native code. Covering a new Apple API is now a matter of running it again.
  • It's one tree. It's built on React Native's New Architecture. Fabric mounts SwiftUI views like any other component, SwiftUI reports its sizes to Yoga, and React children nest inside SwiftUI as real children.
  • Modifiers read like Swift. compose() chains modifiers in order, with every overload typed, instead of spreading them across props. Read Composing modifiers for how it works.
  • It's typed end to end. Every prop, modifier and value has a TypeScript type that comes from the Swift declaration, and the reference you're reading comes from the same source.

Why continue it, instead of starting over

We could have published something new under another name. We chose to continue this project instead, for three reasons.

The idea was right, and early. Rendering real SwiftUI from React was a good idea in 2024. What was missing was a platform that could support it properly. The New Architecture now provides that platform: Fabric shadow nodes let SwiftUI decide sizes, and synchronous native calls make bindings feel instant.

The people using it deserve a way forward. Existing apps depend on swiftui-react-native. Keeping the name and the core ideas gives them a path to the new version, instead of leaving them on an abandoned package.

The credit belongs where it started. The project exists because Andrew Levy built it and the community helped it grow. This version continues that work, and doesn't replace it.