Snap's cross-platform UI framework: declarative TypeScript compiled to native views on iOS, Android and macOS
open sourceMITfree
Valdi is Snap's cross-platform UI framework, used in Snapchat's production apps for eight years before its 1.0 release. You write UI once as declarative TSX components in TypeScript, and Valdi renders them as native views on iOS, Android and macOS, with no web views and no JavaScript bridge. A C++ layout engine with flexbox, global view recycling and viewport-aware rendering keep it fast, and hot reload shows changes in milliseconds, with debugging in VS Code. It embeds into existing UIKit or Android apps (and native views into Valdi), generates type-safe Kotlin, Objective-C and Swift bindings from TypeScript interfaces, and lets you write performance-critical modules in C++, Swift, Kotlin or Objective-C. Compare React Native and Flutter.
Problems it solves
- build one UI for iOS and Android that renders as native views
- add cross-platform screens to an existing native app
- get hot reload for native mobile UI work
Features
- declarative TSX components compiled to native views
- no web views or JavaScript bridge
- hot reload in milliseconds
- VS Code debugging
- embeds into existing iOS and Android apps
- type-safe Kotlin, Objective-C and Swift bindings generated from TypeScript
- C++ flexbox layout engine with view recycling
Limitations
- The web target is still in beta1
Alternatives
The same job
These do what Valdi does.
- NativeScript Write native apps with TypeScript, with direct access to native platform APIs
- React Native Learn once, write anywhere
- Lynx Use web skills to build native UIs for mobile and web from one codebase
- Weex Framework from Alibaba for building cross-platform mobile apps with web technology that render with native components
- uni-app Write a Vue.js app once and publish it to iOS, Android, HarmonyOS, web and mini-programs
