Repository navigation
Ship a real iOS/Android app in plain Vue 3, on React Native's native stack #3471
OneEyed1366
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
If you know Vue, you can ship a native mobile app on React Native's infrastructure without learning React or React Native's component model. Same SFCs, same refs, same scoped styles.
The native half is React Native's - its rendering layer, Yoga, Hermes, Metro - used as a plain unforked dependency. You never write React, and React's renderer never runs.
Vue drives the native side itself, through the Custom Renderer API. So the stack under you is the one React Native already ships, not a new one, and its native modules work.
Starting a project:
addextends an appnewalready scaffolded with more optional layers - testing, splash-screen, more navigation flags - without touching your App source. It's the recommended way in; root README leads with it too.<view>and<text>are the native<div>and<span>: built-in elements, nothing to import.19 of them - view, text, image, pressable, scroll-view, switch, text-input, modal, safe-area-view, the four touchable-*. Only the lists and
KeyboardAvoidingVieware components you import.Script setup, refs, computed, v-for, slots, provide/inject, Teleport, Suspense and KeepAlive all work.
<style scoped>,<style module>, plain .css imports and Sass/Less/Stylus compile to native styles at build time.Navigation is
@symbiote-native/navigation- our own router, with Vue composables:useIsFocused,useFocusEffect,useNavigationState.Speed, against plain React Native 0.86 on the js-framework-benchmark operation list. iPhone 17 simulator, Release, best of three to five runs, 1 000 rows:
removeis where the gap is biggest: 126.3 ms for stock against 6.3 for Vue. A persistent renderer hands Fabric a rebuilt path and it re-lays out ~7 000 Yoga nodes, where we replace one slot and it re-lays out ~1 000.clearis the one row we lose.Two honest costs. An RN library's native view comes free, through the same ViewConfig path as our own primitives, but its JS component is React inside - so each package gets a thin wrapper written by hand.
And Reanimated is the largest remaining gap; it is not started.
Animatedworks on both the JS and the native driver.NativeScript-Vue and Vue Lynx wrote their own native layer, so picking one means adopting its ecosystem too. This one borrows React Native's and swaps out only who renders into it.
React, Angular, Svelte and Solid run on the same core, all at the same feature parity by design. Vue was the second one built, right after React.
Docs: https://docs.symbiote-native.dev/
Repo: https://github.com/OneEyed1366/symbiote-native
If someone puts it on one real screen and tells me where it stops feeling like Vue, that is what I want most. Teleport and Suspense against a native host especially.
All reactions