React Native compatibility map
How the React Native (RN) APIs and components an app commonly uses map to zero-native (zn). Use it to estimate
and plan a move from RN, and to find what to do for each piece.
Checked on 2026-11-02 against the code, not only the docs. The sources are packages/ui/src/index.ts (components,
style keys), packages/template/src/registry.ts (what can really be set), compiler/src/compile.ts (what the build
accepts), packages/core/src/index.ts (what is exported), and the Android runtime. Line numbers match the working
tree that includes step P.2 (permissions, launches, Os, detached, zn://app-icon). (Superseded: steps P.3 and
after were not built then. They are built now; see the updates below. Links are now to files and names, not line numbers.)
Updated 2026-11-03 for P.3b–P.6 (rows for dark mode, scanner, media, WebView, auth, native views, background tasks,
secure screens). Those rows link to files, not lines, and were not re-checked by a second reviewer.
Updated 2026-11-04 for the plugins built since: location, PDF, push (messages, local notifications, OTA check push),
and Firebase (app, Crashlytics, Analytics, Remote Config, Performance). Still missing: maps, biometrics, video, contacts.
nav.pushForResult and onNavResult are built.
Updated 2026-11-03 again for the RN basics pack: Alert, Clipboard, Share, Linking, Platform, Dimensions,
PixelRatio, Keyboard listeners, AppState, Vibration, ToastAndroid, NetInfo, URL, requestAnimationFrame and
TextField ref. They keep their RN names and are imported from @zeronative/core. Guide: guide-notes.md §39.
Platform lines checked again on 2026-11-28 against ios/, plugins/*/ios and packages/core: a row that
names one OS’s engine or rule now says what iOS does too, and where both exist it names both (OkHttp / URLSession).
What the reference app uses most is in §11.
0. Four big differences to know first
Section titled “0. Four big differences to know first”- Dynamic values at runtime (Registry 23). In Registry 23, zero-native supports dynamic runtime expressions across both appearance and layout properties:
- Appearance:
color,backgroundColor,opacity, transforms, imagesrcandtintColor,disabled,text,value,placeholder,editable,visible,accessibilityLabel,impressionKey,borderColor,borderWidth,pointerEvents, SVGfill/stroke/ trims. - Layout & Dimensions:
width,height,minWidth,maxWidth,minHeight,maxHeight,aspectRatio,flex,flexGrow(mapped toflex). - Margins & Padding:
marginand all variants (marginHorizontal,marginStart, etc.),paddingshorthands (padding,paddingHorizontal,paddingVertical). - Spacing:
gap,rowGap,columnGap. - Typography & Shape:
borderRadiusand corner radii,fontSize,lineHeight,letterSpacing. - Visibility:
display: "none" | "flex". Structural keys (flexDirection,flexWrap,alignItems,justifyContent,alignSelf,position) remain build-time only because they select the layout container type or coordinate pass; dynamic switching among them uses a ternary (cond ? <Row>...</Row> : <Column>...</Column>).DynamicPropsin registry.ts, styling-and-layout.md §9.
- Appearance:
- No React. No hooks, no
useState, nouseEffect, no context, noref, nomemo. State is signals, and a component body runs once. See guide-notes.md §1–2. - Unknown props and style keys fail the build. Nothing is silently ignored. See the unknown prop and style key checks in compile.ts.
- Written for Android first.
Platform.OSis"android"on Android and"ios"on iOS (since 2026-11-08). The iOS gaps are in guides/platform-differences.md.
1. Components
Section titled “1. Components”| RN | zero-native | Status | How to move |
|---|---|---|---|
View (column) |
View or Column |
same | <View> imported from @zeronative/ui is a Column (since 2026-11-05, guide-notes §56). Elsewhere flexDirection is still not a style key: pick Row or Column. |
View (flexDirection: "row") |
View or Row |
same | A <View> whose style has flexDirection: "row" known at build time is a Row (since 2026-11-05). A runtime flexDirection, row-reverse and column-reverse are build errors. alignItems: "stretch" in a Row needs a fixed height (platform-differences.md). |
View (overlay, position: "absolute") |
Stack |
different | Absolute children work only inside Stack. zIndex too: on a child of any other element it is a build error (since 2026-11-05; before, it was laid out in the flow), except at a component’s root, where the compiler can’t see the parent. left / right are start / end. Normal children stretch to the Stack’s width as in RN (since 2026-11-05), but they overlap instead of flowing down. |
View (plain box) |
Box |
renamed | Use for a decoration layer or one-child wrapper. |
Fragment / <> |
<>...</> (compile.ts, fragments) |
same | <React.Fragment> is rejected: write <>. |
Text |
Text |
different | Text lives only in Text. Top-level <Text onPress> and <Text onLongPress> supported directly (registry 23; Role Button for TalkBack, no ripple/opacity change). Nested <Text> spans work, also from data ({parts.map((p) => <Text>...)}, &&, runtime styles) and with onPress on a span (onSpanPress, registry 16, since 2026-11-05; guide §18). allowFontScaling={false} = maxFontScale={1}; ellipsizeMode="tail" is accepted (zn always cuts the end) (since 2026-11-05). selectable (Android: Compose SelectionContainer; iOS: a Copy / Share menu for the whole text) and adjustsFontSizeToFit with minimumFontScale and numberOfLines (measured natively: 0.5 sp steps on Android, smooth on iOS) supported since batch 2 (registry 23, 2026-11-08). |
Image (source={{ uri }}) |
Image src |
renamed | source={{ uri: u }} becomes src={u}. require("./a.png") becomes src="asset:images/a.png" (an assets/ folder next to src/). |
Image source={{ uri }}, resizeMode |
src, contentScale |
same | Both RN names work (since 2026-11-05): source={{ uri }} (also a runtime uri) is src; resizeMode cover, contain, stretch (= fill). require("./a.png"), center, repeat: build errors with a hint. |
Image defaultSource |
fallbackSrc |
different | fallbackSrc shows on error, not while loading. For a loading look use loading="shimmer". |
Image onLoad / onError / onLoadEnd / tintColor |
same names | same | Registry 15. e.nativeEvent.source { width, height, uri }, e.nativeEvent.error. For src only (a fallbackSrc sends nothing). tintColor can change at runtime. guide-notes §43. |
Image blurRadius / Image.getSize |
none | missing | Not built (no use in the reference app). |
ImageBackground |
Stack + Image |
missing | Put an Image and the content in a Stack. A gradient is backgroundImage on a style. |
Icon (react-native-vector-icons, svg) |
Icon |
different | SVG path data in a .ts file, fill paths only (strokes work in .svg files and <Svg>, next rows). No icon font, no react-native-svg. New code: .svg files (next rows). |
react-native-svg (Svg, Path, G, Circle, Rect, Defs, gradients, ClipPath, Use) |
Svg and the same element names |
different | Same names and camelCase props. Compiled at build time into one node: geometry must be known at build time; only fill, stroke, opacity may change. .map over a const array works; cond && <X/> inside <Svg> doesn’t (use opacity). svg.md §4.2. |
SvgXml / SvgUri / react-native-svg-transformer (import Logo from "./logo.svg") |
import Logo from "./logo.svg" (svg-modules.d.ts) |
different | The import works with no Metro config; the file is read at build time. SvgXml with a string: save it as a .svg file. SvgUri (remote SVG): missing. Tint with color (needs fill="currentColor" in the file). svg.md §4.1. |
react-native-svg Text, TSpan, Image, Pattern, Mask (non-white), Marker, filters |
in .svg files only (registry 13) |
different | A .svg file may use <text> / <tspan> (simple, one line, the phone’s fonts), patterns, any mask, markers and filters (blur, drop shadow, colour matrix, …; below Android 12 a plain shadow or none) (svg.md §17). As inline <Svg> elements: missing, build error with a hint. Image: <Image> in a <Stack>. Text people read: zn <Text> over the SVG. |
Animated SVG (Animated.createAnimatedComponent(Path), Reanimated useAnimatedProps) |
part rotate / scale / translateX / trims + animate (svg.md §9) |
different | Built 2026-11-03 (registry 11). Say the target value and how it animates; no animated props from JS. strokeDashoffset “draw the line” tricks become trimEnd. Path morphing (animating d): missing from JS; an .svg file’s SMIL / CSS d animation morphs (registry 12, svg.md §16). strokeWidth / dashOffset on .svg parts (registry 12). |
Animated .svg files (SMIL <animate>, CSS @keyframes inside the file; loaders from icon sites) |
import Spinner from "./spinner.svg" |
better | RN’s react-native-svg ignores SMIL and CSS animation (the file shows still). zn compiles them into native part animations at build time (svg.md §15): 104 of 104 real loaders play (§17; 95 before phase 3, 100 before phase 4), path morphing, dash and stroke-width animation, filters, moving along a path (animateMotion, CSS offset-path) and begin="click" (a tap on the Svg) included. Other events (mouseover) fail with a hint. |
ScrollView |
Scroll |
different | Props: horizontal, pull to refresh. refreshControl works on a vertical Scroll (see RefreshControl). contentContainerStyle works with padding keys only (since 2026-11-05). The padding in style also scrolls with the content, unlike RN, so put padding in one place: the build fails if both have it. Use margin for space outside. showsVerticalScrollIndicator={false}, keyboardShouldPersistTaps="handled" and the speed / iOS props are accepted (since 2026-11-05; Android draws no scroll bar; iOS shows its own scroll bar on a Scroll and a vertical List, and {false} doesn’t hide it yet). keyboardDismissMode "on-drag" and "interactive" work on Scroll and List (registry 24, 2026-11-09; guide §76). Scroll offset: useElementMotion() + motion={m} (registry 24). Registry 24 (2026-11-09, guide §79): onScroll (+ scrollEventThrottle, once per frame by default), onScrollBeginDrag / EndDrag, onMomentumScrollBegin / End, pagingEnabled, snapToInterval, snapToOffsets, snapToAlignment, snapToStart / End, decelerationRate, disableIntervalMomentum, and ref with scrollTo / scrollToEnd; the same on List. Long vertical data must use List. <ScrollView> itself is a build error that says “use |
FlatList |
FlatList or List |
same | <FlatList data renderItem={({ item, index }) => ...} keyExtractor> works as in RN (since 2026-11-05, guide-notes §56); with no keyExtractor the key is item.key, then item.id, then the index. zn’s own names: key, row (gets the item itself). Speed hints (initialNumToRender, windowSize, extraData, …) are dropped. ItemSeparatorComponent → gap (or rowGap). onEndReached same. stickyHeaderIndices same (registry 15). contentContainerStyle={{ paddingBottom: 100 }} same (padding keys only); padding in style scrolls with the rows too. lists.md. |
FlatList headers, empty, footer |
ListHeaderComponent, ListFooterComponent, ListEmptyComponent |
same | Supported since batch 2 (2026-11-08). Pass an element (<Header />) or component (Header). Mounted natively inside the list (Compose’s LazyColumn / LazyRow on Android, a UICollectionView on iOS); empty state renders automatically when data is empty. |
FlatList scroll commands |
ref.current.scrollToIndex, scrollToEnd, scrollToOffset or controller={ctrl} |
same | Supported since batch 2 (registry 23, 2026-11-08). Dispatches scroll actions to the native list (Compose’s LazyListState on Android, the UICollectionView on iOS) via slot transport (index, end, offset with animated option). Queues calls made prior to mount. |
FlatList refreshing / onRefresh / refreshControl |
same names on List |
same | Pull to refresh, guide-notes §41. |
FlatList inverted |
<List inverted> |
built (registry 19, 2026-11-06) | Same meaning: row 0 at the bottom, for chats. A list flipped with transform: [{ scaleY: -1 }] (RN’s old trick) is a build error: on Android its fling runs the wrong way. Guide §65. |
FlatList horizontal |
<FlatList horizontal> or <List horizontal> |
built (registry 23, 2026-11-08) | Lays rows out horizontally (Compose’s LazyRow on Android, a UICollectionView on iOS). Cards keep their own width (definiteWidth = false unless row sets explicit width). contentContainerStyle padding and gap work along the row. stickyHeaderIndices, inverted and pull to refresh fail sideways. |
FlatList numColumns, columnWrapperStyle |
same | different | Registry 24 (2026-11-09, guide notes §86): a vertical grid; each row is laid out like RN’s row (a Row styled by columnWrapperStyle: gap / columnGap, justifyContent, alignItems, padding), so flex: 1 and width: "48%" items look as in RN. Differences: a short last row keeps the columns’ widths (RN widens flex: 1 items); numColumns may change at runtime (RN needs a new key). Header, footer, empty, onEndReached, scrollToIndex (item index), pull to refresh, inverted work. Not with horizontal (as RN), stickyHeaderIndices or reorderable. |
FlatList getItemLayout |
none | missing | Dropped. |
SectionList |
none | missing | Flatten sections into one data array with header items. |
FlatList onViewableItemsChanged |
useImpressions + impressionKey |
different | Counted natively once a card is visible enough. Scroll events in JS: onScroll and friends (registry 24). |
.map() in JSX |
{items.map(i => <Row key={i.id}/>)} |
same | Up to ~100 items. The key goes on the row’s root. |
Pressable |
Pressable |
different | onPress, onPressIn, onLongPress, disabled same. A handler that is undefined does nothing, and a handler that changes is used from the next tap, as in RN (latest, 2026-11-03). An onLongPress that holds no handler at that moment lets a long hold give onPress, as in RN (registry 14). onPressOut gets cancelled (a boolean), not an event. Only Pressable takes taps: onPress on any other element is a build error (since 2026-11-05). It lays its children out as a column. |
Pressable style={({ pressed }) => ...} |
pressFeedback, pressScale, pressOpacity, highlightColor |
different | The style function is not supported. Pick the effect by prop: native draws it with no JS. |
Pressable android_ripple |
same, or rippleColor, rippleBorderless, rippleRadius |
same | android_ripple={{ color, borderless, radius }} works (since 2026-11-05); foreground is ignored. The ripple is on by default (RN’s Pressable has none). |
TouchableOpacity / TouchableHighlight / TouchableWithoutFeedback |
same names (ui/index.ts) | same | Since 2026-11-05, guide-notes §56: a Pressable with no ripple. Opacity dims to activeOpacity (default 0.2). Highlight draws underlayColor (default black) at 1 - activeOpacity (default 0.85) over the content: close to RN, not the same pixels. WithoutFeedback: no feedback. Since registry 23, flexDirection: "row" known at build time is automatically wrapped in a <Row> by the compiler, moving child layout keys (alignItems, justifyContent, gap, rowGap, columnGap) to the Row while box styles and press handlers stay on the Touchable. |
Pressable hitSlop, testID |
same names | different | Registry 15. hitSlop: build-time; each axis reaches its larger side on both sides, and a tap in it loses to another tappable element under the finger (iOS also grows every Pressable to 44 pt, platform differences). testID (every element): the id UI tests see (Android: the resource id; iOS: the accessibilityIdentifier). guide-notes §43. |
Pressable delayLongPress |
none | missing | The system long-press time. |
Button |
none | missing | Build it from Pressable + Text. |
TextInput |
TextField |
renamed | See the prop rows below. |
TextInput value, onChangeText, placeholder, maxLength, multiline, autoFocus, editable, autoCorrect, selectionColor, onFocus, onBlur |
same names | same | Set value in onChangeText synchronously (the field always ends up showing value). |
TextInput placeholderTextColor |
same, or placeholderColor |
same | Since 2026-11-05. |
TextInput keyboardType |
keyboardType |
different | Values: default, number-pad, decimal-pad, phone-pad, email-address, url, and RN’s numeric (= decimal-pad, since 2026-11-05). |
TextInput onSubmitEditing |
onSubmitEditing(text) |
different | It gets the text, not an event. Key label: returnKeyType (done, go, next, search, send). |
TextInput secureTextEntry, autoCapitalize |
same names | same | autoCapitalize: none, sentences, words, characters. |
TextInput ref.focus() / blur() / clear() / isFocused() |
ref + createRef |
different | useRef<TextInput>(null) → createRef<TextFieldHandle>(); then ref={r} and r.current?.focus() as in RN. Only on TextField. OTP boxes: one hidden field plus drawn boxes (guide-notes.md §39). |
TextInput autoComplete, textContentType |
autoComplete; textContentType ignored |
same | Registry 17 (2026-11-05, R36): RN’s names (tel, tel-national, sms-otp, one-time-code, email, name, password, …) as Android autofill hints and, on iOS, as the field’s textContentType (sms-otp = .oneTimeCode). textContentType written in TSX is accepted and dropped on both: write autoComplete. No credit card hints. |
TextInput onChange, onKeyPress, onSelectionChange, selection, defaultValue, inputMode, numberOfLines |
none | missing | Use value as the initial value. Close the keyboard with Keyboard.dismiss(). No key events yet. |
ActivityIndicator |
ActivityIndicator or Spinner |
same | Since 2026-11-05: size "small" (20 dp), "large" (36 dp) or a number; color same; animating={false} hides it and keeps its space, as on Android. hidesWhenStopped={false}: build error. |
Switch |
Switch |
different | value, onValueChange, disabled, thumbColor same. trackColor={{ false, true }} works (since 2026-11-05; = trackColor + activeTrackColor); ios_backgroundColor is dropped (on iOS too). It is strictly controlled: set the signal or the thumb does not move. |
Checkbox (community) |
Checkbox |
different | value, onValueChange, color, activeColor. |
| (progress bar libs) | Progress |
different | value 0–1, omit for endless. |
| (skeleton libs) | Shimmer |
different | All shimmers on screen move in step. |
Modal |
Modal |
same | Registry 15: a full-screen window, your content in it. visible, transparent, animationType, statusBarTranslucent, navigationBarTranslucent, onRequestClose, onShow. RN’s iOS-only props (presentationStyle, supportedOrientations, …) are accepted and dropped, on iOS too. On iOS onRequestClose never fires (no system Back). For a bottom sheet with drag and detents, Sheet is still there. guide-notes §43. |
react-native-pager-view / Carousel |
Carousel |
same | Native pager (Compose’s HorizontalPager on Android, a SwiftUI ScrollView that snaps page by page on iOS) with snapping, page dots, autoAdvance, and peeking pages via itemWidth (number in dp or percentage string "80%", registry 23, 2026-11-08). |
@shopify/react-native-skia |
<Canvas> + draw |
different | A command list ([draw.rect(...), ...]), not child elements; no Skia library (saves 8-15 MB). Units are dp. Gradients (linear, radial, sweep) need 2+ colours; dash an even count. Has image, paragraph, path trims, polyline / smoothPath, clipRect / clipRoundRect / clipPath with intersect / difference, fillType, blendMode, shadow and blur (Android 9+). iOS draws every command with Core Graphics. Per-frame values: numbers and paint colour / opacity / strokeWidth take zn motion values (Skia’s Reanimated shared values), read natively with no JS; gradients, dash, path data and text layout can’t move. A gesture on the Canvas gives touchX / touchY. Not yet: shaders (runtime effects), text measuring from JS, a native signature pad. Fixed after review 2026-11-08 (second-opinions 180); motion and new commands 2026-11-09 (second-opinions 197-199). |
Alert.alert |
Alert.alert |
same | Android’s own dialog with the app’s theme, up to 3 buttons, cancelable, onDismiss. Stays open when the phone turns. iOS: a UIAlertController with the buttons’ cancel / destructive styles; cancelable is Android only, as in RN, so an iOS alert closes only through a button. Alert.prompt is iOS only in RN; not built. |
Dimensions.get / addEventListener, useWindowDimensions |
Dimensions, useWindowDimensions |
different | Same values (dp, scale, fontScale). They can size a layout (width, height, margin, padding from a signal, §0). Read inside JSX or effect to follow changes. Not ready at a file’s top level. |
PixelRatio |
PixelRatio |
same | get, getFontScale, getPixelSizeForLayoutSize, roundToNearestPixel. |
SafeAreaView / react-native-safe-area-context |
route option safeArea + insets() |
different | Delete SafeAreaView. Set safeArea on the route (safeArea in routes.ts); for a coloured header use insets().top. |
StatusBar |
StatusBar |
same | Registry 15: barStyle, backgroundColor (drawn by zn behind the bar: on Android 15+ too, and on iOS), hidden, all at runtime; belongs to its screen. translucent does nothing (the route’s safeArea decides). StatusBar.setBarStyle / currentHeight: not built (insets().top). zn adds <NavigationBar>. guide-notes §43. |
KeyboardAvoidingView |
route option keyboard: "resize" |
different | On by default. Delete the component. keyboard in routes.ts. |
RefreshControl |
RefreshControl |
same | Only inside refreshControl={...} on a vertical Scroll or a List, written there (not kept in a variable). refreshing, onRefresh, colors (first colour only), tintColor, progressBackgroundColor. Other props are a build error. Or use the flat props refreshing, onRefresh, refreshColor, refreshBackground. Android draws its disc, which slides over the content; iOS keeps UIKit’s spinner, with a disc under it only when refreshBackground / progressBackgroundColor is set. guide-notes §41. |
Animated, LayoutAnimation, Easing |
animate, enter, exit props, Timing |
different | No Animated.Value. Say how a change should animate: animate={250} or animate={{ opacity: 200, translateY: "spring" }}. enter / exit for mount and unmount. Gesture-driven animation is missing. Easing.bezier(x1, y1, x2, y2) → easing: [x1, y1, x2, y2]. |
Animated.loop, Reanimated withRepeat |
timing repeat (count or "forever"), reverse, repeatDelay |
different | withRepeat(x, n, true) → { ..., repeat: n, reverse: true }. RN’s iterations and zn’s repeat both count all plays. Needs from or keyframes. paused / replay props stop and restart it. guide-notes.md §22. |
Animated.delay, Animated.stagger, Reanimated withDelay |
timing delay; enter={{ ..., delay: i * 40 }} for a stagger |
different | One delay per timing, each time it starts. |
Animated.sequence, Reanimated withSequence |
timing keyframes + times |
different | One prop through several values (a shake: keyframes: [0, -8, 8, 0]). A sequence across different props or elements: give each its own delay. |
Reanimated, react-native-gesture-handler |
motion values, derive, gestures (motion.md) |
different | Registry 24 (2026-11-09). Built our own way: values and gestures run natively, maths is compiled derive, no JS on the UI thread. Porting table: §12. |
StyleSheet.create, flatten, hairlineWidth |
StyleSheet |
same | Folded at build time. absoluteFill / absoluteFillObject too (registry 15: an absolute child with both start and end, or top and bottom, stretches between them). flatten and hairlineWidth since 2026-11-05: hairlineWidth is 0.4 dp (RN rounds it to one real pixel per phone; a build can’t know the phone). |
accessibilityLabel, accessibilityHint |
same names | same | accessibilityLabel in ui/index.ts. |
accessibilityRole, role |
same names | different | Values: button, header, image, link, text, switch, checkbox, none. RN’s role works too (since 2026-11-05; heading = header, img = image, presentation = none). Others are a build error. aria-label = accessibilityLabel. |
accessibilityElementsHidden, aria-hidden, importantForAccessibility |
same names, or accessibilityHidden |
same | Since 2026-11-05: importantForAccessibility="no-hide-descendants" hides the element and its children; "auto" / "yes" change nothing; "no" (hide only this one) is a build error. |
onLayout, pointerEvents |
same names | different | Registry 15. onLayout: e.nativeEvent.layout in dp, on a change. pointerEvents as in RN, at runtime too. Without it, an absolute layer with a background or children stops taps as in RN; any other element without handlers lets them through (RN stops them). guide-notes §43. |
accessible, accessibilityState, accessibilityActions, ref |
none | missing | No equivalent. Remove them. accessibilityState for toggles: use Switch / Checkbox. |
2. Style keys
Section titled “2. Style keys”Types: StyleProps, TextStyleProps. The real list
is the Prop table in Prop in registry.ts. Remember: most values must be
known at build time (section 0).
| RN key | zero-native | Status | How to move |
|---|---|---|---|
flex, width, height, minWidth, maxWidth, minHeight, maxHeight, aspectRatio, gap, justifyContent, alignItems, alignSelf |
same | same | width / height take a number or "N%". alignItems has no baseline. justifyContent has all six values. gap works with every justifyContent (before 2026-11-05 it was dropped unless flex-start); with space-* it is the smallest space, as in RN (second-opinions 112). |
margin*, padding* (Horizontal, Vertical, Top, Bottom) |
same | same | Negative margins supported since batch 2 (2026-11-08) natively: on Android a Compose custom layout places the element with the offset and shrinks the space the parent gives it, to match RN/Yoga overlap; on iOS SwiftUI padding takes the negative value (a code read, not measured on screen). Negative padding and border widths remain a build error (RN treats them as 0) (second-opinions 113). |
marginLeft, marginRight, paddingLeft, paddingRight |
same, or marginStart, marginEnd, paddingStart, paddingEnd |
same | Since 2026-11-05 the RN names work in a style. Left = Start, Right = End: the same in a left-to-right app; in right-to-left they flip (RN’s don’t). A Start / End key written too wins, as in RN. |
left, right, top, bottom |
same, or start, end |
same | left / right work since 2026-11-05 (= start / end). position: "absolute" only for children of Stack (a build error elsewhere, since 2026-11-05). |
flexDirection |
Row / Column, or <View> |
different | On <View> it picks Row or Column at build time (since 2026-11-05). On Touchable / Pressable with flexDirection: "row", compiler automatically wraps children in a <Row> (registry 23). On other elements: a build error with a hint. |
flexGrow, flexShrink, flexBasis, rowGap, columnGap |
flex, dropped, gap |
different | Since 2026-11-05: flexGrow: n = flex: n (two growing children with different content widths split the space a little differently). flexShrink 0 / 1 and flexBasis 0 / "auto" are dropped; other values fail. rowGap in a Column (or vertical List / Scroll), columnGap in a Row (or horizontal Scroll / Carousel / horizontal List) is the gap, and beats gap; the other one is dropped. |
flexWrap, alignContent |
same | different | Registry 24 (2026-11-09, guide notes §85): flexWrap: "wrap" on a Row or a View with flexDirection: "row" (chips, tags), with justifyContent and alignItems per line, columnGap along a line, rowGap between lines (gap: both; rowGap can change at runtime), alignContent (no "stretch"), flex sharing what a line has left. Matches Yoga in the layout lab (cases 30–37). Not on a Column; no "wrap-reverse"; unset alignItems puts children at the line’s top (only an explicit "stretch" stretches, as zn’s Row). From a signal: a build error. |
display |
same | same | Registry 23: "none" / "flex", can change at runtime. |
backgroundColor, opacity, elevation, shadowColor |
same | same | backgroundColor and opacity can change at runtime. |
borderRadius, borderWidth, borderColor |
same | same | borderWidth and borderColor can change at runtime (registry 15). |
borderTopWidth, borderBottomWidth |
same | same | Both use the one borderColor. |
borderTopLeftRadius and the other corner keys |
same | same | Registry 15. Left / Right are drawn as Start / End. |
borderStyle |
same | same | Registry 16 (since 2026-11-05): "solid", "dashed", "dotted", for borderWidth and the top / bottom lines, with RN Android’s dash lengths. |
borderLeftWidth, borderRightWidth, per-side colours |
none | missing | Nest a Box, or draw a divider as a thin Box. |
shadowOffset, shadowOpacity, shadowRadius |
accepted, dropped | same | As RN on Android, on both platforms: the shadow comes from elevation and shadowColor (registry 15 build; no registry need). iOS draws it as a soft shadow from the same two keys (platform differences). |
overflow |
same | different | visible or hidden only (scroll is missing). |
zIndex |
same | different | Inside Stack, and since registry 16 (2026-11-05) on a child of Column, Row, Box, Pressable: orders it among its siblings, as RN. Not in Scroll, List, Carousel (a build error). |
transform |
same | different | scale, scaleX, scaleY, translateX, translateY, rotate ("45deg" or a number). zn always draws move → rotate → scale, one value per key: a list whose RN order would draw differently (a scale or rotate before a move, scaleX / scaleY before rotate, a key twice) is a build error (since 2026-11-05). No skew, perspective, matrix. |
transformOrigin |
same | built (registry 20, 2026-11-07) | Keywords and percents ("left", "top left", "50% 100%", ["0%", "50%"]), fixed at build time. Used by scale, rotate, animate and keyframes. Lengths (px / dp) and a z value other than 0 are build errors. left / right are physical, as RN. Guide §68. |
backgroundImage: "linear-gradient(...)" |
same | same | Build-time only. Not for radial gradients. |
color, fontSize, fontStyle, letterSpacing, lineHeight, textDecorationLine, numberOfLines |
same | same | numberOfLines is both a prop and a style key. |
fontWeight |
same | different | Numbers 100–900 in steps of 100, "normal", "bold". Strings like "500" work too (compiler/src/compile.ts fontWeight). |
textAlign |
same | same | left / auto = start, right = end (since 2026-11-05 as written; they flip in right-to-left). justify is a build error. |
maxFontScale |
same | different | New key (RN has maxFontSizeMultiplier). |
textTransform |
same | same | Registry 15, also on runtime text. |
includeFontPadding |
same | different | Registry 16 (since 2026-11-05). zn’s default is false (RN Android’s is true): write true to get RN’s 2-3 dp taller lines. Ignored on iOS (Android only, as in RN). |
textDecorationStyle |
same | different | Registry 16: "solid", "dashed", "dotted" with an underline or line-through, on a whole Text (not a span). RN draws this on iOS only; zn draws it on both (iOS with SwiftUI’s line patterns). "double" / "wavy" are a build error. |
fontFamily |
same | same | Registry 24 (2026-11-09, guide notes §84): .ttf / .otf files in the app’s assets/fonts/ (RN / Expo’s place); the name is a file name without the extension ("Poppins-SemiBold", as RN Android) or the family the files share ("Poppins"), where fontWeight / fontStyle pick the face. On Text, TextField, OtpInput digits and spans (also spans from data). System names work: System, sans-serif, serif, monospace, sans-serif-medium, … A name the app has no file for fails the build; from data, an unknown name draws the system font. Fonts are bundle files, so an OTA update can add one. No variable fonts, no .ttc, not from a signal. iOS: the same (ZnFonts.swift; app files loaded without registering them; system names map to the phone’s fonts). |
textAlignVertical, textShadow*, userSelect |
none | missing | With no textAlignVertical, a single-line TextField centres its text vertically (as RN on Android) and a multiline one starts at the top (RN centres it; apps add textAlignVertical="top") (2026-11-05). |
resizeMode (as a style) |
contentScale prop |
renamed | See Image. tintColor on Image: see Image. |
3. Navigation
Section titled “3. Navigation”zero-native has its own small navigator: a stack of screens, native transitions, back handling. It is not
React Navigation. nav in nav.ts, routes.ts.
| RN (React Navigation) | zero-native | Status | How to move |
|---|---|---|---|
createNativeStackNavigator + Stack.Screen |
defineRoutes + startApp |
different | One routes.ts: name: { path, screen, ...options }. The route order is the number used at runtime. |
navigation.navigate(name, params) / push |
nav.push |
renamed | Names and params are type-checked (register the routes type). Params must be plain JSON: pass ids, not objects. |
navigation.goBack() |
nav.back |
renamed | Returns false on the last screen. |
navigation.replace |
nav.replace |
same | |
navigation.reset |
nav.reset |
same | Takes [{ name, params }], bottom first. |
route.params |
screen props | different | Params arrive as the props of the screen function. Every :param in the path must be a string prop. |
useNavigation() (goBack, canGoBack, push, replace, pop, popToTop, isFocused) |
useNavigation |
same | Since 2026-11-05. No navigate: React Navigation’s jumps back to a screen already open; use push or goBack. |
setImmediate / clearImmediate |
global, timers.ts | same | Since 2026-11-05: a 0 ms timer; it stops with its screen, as other timers. |
useRoute, navigation.getState() |
useRoute, nav.current(), nav.depth() |
different | useRoute() gives this screen’s { key, name, params } (since 2026-11-05). No getState. |
BackHandler.addEventListener("hardwareBackPress") |
BackHandler or useBack |
same | Since 2026-11-05: returns { remove() }; exitApp() too. The handler belongs to a screen: the one being built, else the top one, and it stops when that screen closes. Return true when you handled it. |
beforeRemove listener |
useBack |
different | Covers the system back only. Make the on-screen back button call the same handler. |
Screen options: animation, presentation: "modal" |
route transition: "push" | "modal" | "fade" | "none" |
renamed | transition in routes.ts. |
presentation: "transparentModal" |
route transparent: true |
renamed | Registry 24: the screen below stays drawn; no transition, the screen animates itself. |
Deep link linking config |
route deepLink: true + onLink + the app manifest |
different | Opt-in per route. Match by path (zn://<app>/<path>, or your own scheme: in AndroidManifest.xml on Android; on iOS in the Info.plist’s CFBundleURLTypes, or a universal link, which the app’s scene delegate hands to ZnApp.openLink). Query values become params. onLink can refuse a link. ZnNav.kt, ZnRoutes.swift. |
| Restore state after the app was killed | route restore + restorableSignal |
different | The stack comes back by itself. Small values you want back: restorableSignal (≤ 4,000 chars of JSON). |
useFocusEffect, navigation.addListener("focus") |
useFocusEffect / useFocus; in a tab tabs.onFocus(name, fn) |
renamed | useFocusEffect(useCallback(fn, [])) works (since 2026-11-05). Runs when the screen opens on top and each time the screen above it closes; the returned function runs on blur. navigation.isFocused() from useNavigation(). Guide notes §40. |
navigation.setOptions / header bar (headerShown, headerRight, headerTitle) |
none | missing | There is no header component. Build the header in your screen (a Row, insets().top, a back Pressable calling nav.back(); a collapsing title with motion values). Parked by Pavan 2026-11-09: an app writes its own header component. |
Bottom tab navigator (createBottomTabNavigator), custom tabBar |
route tabs: [...] + useTabs + <Tabs> |
different | The tabs live in one screen; the bar is your own JSX (tabBar ports straight). Lazy by default (preload: true = lazy: false), hidden tabs keep their state (freezeOnBlur), Back goes to the first tab, the tab comes back after a kill, links reach a tab. navigation.navigate("stores") from a tab → tabs.select("stores"). Guide notes §40. |
| Drawer, top tabs | none | missing | No drawer. Top tabs: a Pressable row over <Tabs>, or a Carousel. |
Nested navigators, navigation.setParams, navigation.getParent() |
none | missing | One flat stack. Put state in signals or restorableSignal. |
Await a result from a screen (navigation.navigate with a callback / event) |
nav.pushForResult and onNavResult |
different | Built. Only for native screens (route native: ...): the promise gives the screen’s answer, or null if it closed without one. onNavResult hears the answer after a kill. For a JS screen, pass the result through a shared signal or flowStore (plugins.md §5). |
4. Storage
Section titled “4. Storage”| RN | zero-native | Status | How to move |
|---|---|---|---|
AsyncStorage (getItem, setItem, removeItem, mergeItem, clear, getAllKeys, multi*) |
AsyncStorage or storage |
same | AsyncStorage from @zeronative/core works as in RN (since 2026-11-05): strings, Promises, null for a missing key, in its own store. zn’s storage is synchronous and typed (getString, getNumber, …; undefined for missing). |
react-native-mmkv (new MMKV({ id })) |
createStorage(id), storage |
renamed | Same engine and shape (MMKV). getString, getNumber, getBoolean, set, delete, clearAll → clear. onChange → onChange. |
redux-persist, a persisted store |
persistedSignal |
different | A signal that saves itself as JSON. |
expo-secure-store / react-native-keychain |
SecureStore |
different | get / set / delete, strings only (≤ 64 KB), async. Android: encrypted with a key in the Android Keystore; iOS: the Keychain, where the first start after a reinstall clears what an earlier install left, so a reinstall signs out on both. get returns null if the value can no longer be read: treat as “sign in again”. No biometric prompt option. |
| (no RN equivalent) crash-safe record | flowStore |
different | Not in RN. Use it for a payment record that must never be lost. guide-notes.md §16. |
react-native-fs, expo-file-system |
none | missing | No file read / write API, in core or in the media plugin (media shipped in P.6 with pickers, camera and edit only; files are zn://file handles). Not planned yet. |
5. Network and web APIs
Section titled “5. Network and web APIs”| RN | zero-native | Status | How to move |
|---|---|---|---|
fetch |
fetch |
same | OkHttp underneath on Android, URLSession on iOS (fetch.md; iOS’s FormData file parts take file:// only). HTTP errors do not throw: check res.ok. Network failures throw FetchError with a code (offline, dns, …). |
Differences from RN fetch |
fetch.md | different | Default timeout 30 s, response limit 10 MB (setFetchDefaults). No res.body stream. credentials, cache, mode are accepted and ignored. A fetch is not cancelled when its screen closes: use useAbortSignal() for that. |
Headers, Request, Response, FormData, URLSearchParams, AbortController |
Headers, Request, Response, FormData, AbortController |
same | A file in FormData is { uri, name, type } with a content:// or file:// uri, as in RN. |
XMLHttpRequest, axios (XHR adapter) |
none | missing (not planned) | Use fetch. For axios, use its fetch adapter or replace it. Upload and download progress: fetch(url, { onUploadProgress, onDownloadProgress }) (fetch.md). |
WebSocket |
WebSocket |
different | Browser API on OkHttp, the shared fetch client, on Android and on URLSessionWebSocketTask on iOS (pings every 10 s on both). Differences: text frames only (binary from the server: error, then close 1003); 1 MB per message in UTF-8 bytes; bufferedAmount always 0; binaryType has no effect; no headers option (RN has one), the User-Agent is the app’s; url is serialized (ws://h becomes ws://h/). Like browsers: close() while CONNECTING gives error, then close 1006; send in CLOSING / CLOSED does nothing; once listeners. Cancelled on dev reload or OTA restart. Fixed after review 2026-11-08 (second-opinions 161, 179). Known issue on an iPhone (0.1.0): a server close right at connect can reach JS as close 1006, without the server’s code and reason: turn a bad token away in the handshake (HTTP 401) instead (fetch.md §8). |
NetInfo.fetch / refresh / addEventListener (@react-native-community/netinfo) |
NetInfo |
same | Import from @zeronative/core. type, isConnected, isInternetReachable (Android’s own “validated” check, no extra request; iOS: true when NWPathMonitor has a route out, as RN’s iOS default), details.isConnectionExpensive. The listener hears the state now, then changes. Still handle FetchError code offline on each call. |
useNetInfo |
useNetInfo |
different | Call it in a screen body; read its fields inside JSX or effect to follow changes. |
URL, URLSearchParams |
installed by the runtime (url.ts) | same | The web standard, tested against Bun. Non-ASCII host names (https://café.com) throw a TypeError: no punycode. No createObjectURL. |
atob, btoa |
Hermes | same | Built into Hermes V1. |
crypto.getRandomValues, structuredClone |
none | missing | Not provided. |
setTimeout, setInterval |
setTimeout in timers.ts |
different | Timers made in a screen stop when the screen closes. For work that must go on, use detached. InteractionManager is missing (setImmediate is there, see its row). |
requestAnimationFrame, cancelAnimationFrame |
requestAnimationFrame in timers.ts |
different | A timer of about 16 ms, not a real frame; it stops with its screen. Fine for “after this frame”; don’t animate with it (use animate). |
TextEncoder / TextDecoder, Intl |
installed by the runtime (installText in text.ts) |
same | |
console.log |
installed by the runtime | same | |
ErrorUtils.setGlobalHandler |
onError |
renamed | Also sees unhandled promise rejections. |
6. Device and OS
Section titled “6. Device and OS”| RN | zero-native | Status | How to move |
|---|---|---|---|
Linking.openURL(url) |
Linking.openURL (also Os.openUrl) |
same | Any app’s link, as in RN (whatsapp:, upi:, sms:, geo:, market:; since 2026-11-08). Only intent:, file:, javascript: and links with no scheme reject with not_allowed, on both platforms (ZnOs.kt, ZnBuiltInModules.swift). Filtering links written by others is the app’s job, as in RN. canOpenURL needs the scheme in the app’s <queries> on Android 11+, and in LSApplicationQueriesSchemes on iOS, as in RN. |
Linking.canOpenURL |
Linking.canOpenURL |
same | Android: true for http, https, mailto and tel when an app can open them (the runtime’s manifest lists those four in <queries>); another scheme only when the app’s own <queries> lists it. iOS: http(s) always; another scheme only when the app’s Info.plist lists it in LSApplicationQueriesSchemes. |
Linking.openSettings() |
Linking.openSettings (also Os.openSettings) |
same | |
Linking.getInitialURL() / addEventListener("url") |
Linking over startApp({ onLink }) |
different | Read-only copies: only links that matched a route with deepLink: true and got past onLink reach JS, and their screen is already open. Refuse links in onLink, not here. |
Linking.sendIntent |
none | missing | Only a plugin’s native code opens another app for a result (§7). |
PermissionsAndroid.request / requestMultiple |
Permissions.request |
renamed | Takes a list of names: "camera", "contacts", "location", "microphone", "notifications", or a full android.permission.X. Returns granted, denied, blocked (RN: never_ask_again). The permission must be in the manifest (iOS: its usage text in the Info.plist) or the call fails with not_declared. On iOS an android.permission.X name answers denied, and "contacts" needs the Swift condition ZN_CONTACTS. "location" asks for precise and approximate together (as Android 12+ needs), so granted can mean approximate only: read location.precise in the answer to know. If the manifest has only the precise one, the call fails with not_declared. Guide notes §32. |
PermissionsAndroid.check |
Permissions.status |
renamed | A permission never asked for reads as denied. |
AppState.currentState |
AppState.currentState (also appState()) |
same | Two states: active, background (inactive never comes, on both platforms: iOS’s inactive, such as Control Center or the app switcher, reads as background). It reads a signal, so JSX follows it. |
AppState.addEventListener("change" | "memoryWarning") |
AppState.addEventListener (also onAppState) |
same | Returns { remove }. Not called for the state at start. background also shows while a permission dialog or a see-through payment window is on top. RN’s Android-only focus / blur events are missing. |
Share.share({ message, title }, { dialogTitle }) |
Share.share |
same | Answers { action: "sharedAction" } once the sheet opened, as RN on Android (iOS: the share sheet, UIActivityViewController). Android 10+ doesn’t show dialogTitle for text (RN neither). url is iOS only in RN; here it is shared as the text when there is no message. No files. |
Vibration.vibrate(ms | pattern, repeat), Vibration.cancel |
Vibration |
same | Android: the app’s manifest needs android.permission.VIBRATE, as in RN; without it, one warning and no buzz. iOS: one system buzz with no length, as RN on iOS (a pattern buzzes once per buzz step); nothing on the simulator. |
expo-haptics |
Os.haptic |
different | Four kinds: light, medium, success, error, no permission needed. On a Pressable, haptic gives a tick on press. |
Clipboard.setString / getString / hasString (@react-native-clipboard/clipboard) |
Clipboard |
same | Import from @zeronative/core. Text only. getString gives “” while the app is not in front (Android 10+). On iOS 16+ reading what another app copied asks the user (“Allow Paste”); getString waits for the answer. |
DeviceInfo, expo-application |
Os.info |
renamed | appVersion, appBuild, packageName (2026-11-06; on iOS the bundle id), android, sdk, model, manufacturer, rtl. On iOS android is "" and sdk 0, plus an ios field (the iOS version). |
react-native-device-info |
@zeronative/device-info |
same | Same names and values as RN, on Android and iOS (values only Android has answer "unknown", -1 or false on iOS), default and named imports. Fixed values (getVersion, getBundleId, getUniqueIdSync, …) are sync, also at module level: native hands them over before the JS starts (core nativeConstants). Changing values (battery, disk, network) are Promises only: no Sync form. hasNotch from the real screen cut-out. Not built: hooks, change events, getInstallReferrer (answers “unknown”). Added 2026-11-06. |
Platform.OS, Platform.Version, Platform.select, Platform.constants |
Platform |
same | OS is "android" or "ios" (on iOS right even at a file’s top level). Version: Android’s API level; on iOS the major iOS version as a number (18), where RN gives the string “18.0” (read constants.Release). Native sends the other values after the main script: at a file’s top level Version reads 0 (with a warning). constants: Release, Model, Brand, Manufacturer, Version (on iOS Brand and Manufacturer are “Apple”). |
Appearance, useColorScheme |
Appearance, useColorScheme, colorScheme, scheme(light, dark) |
different | Since 2026-11-05: Appearance.getColorScheme(), addChangeListener(...).remove(), useColorScheme(). A body runs once, so a value kept in a variable doesn’t follow a later change: read it inside JSX, or use scheme(light, dark). Templates draw before JS, so a dark phone can flash light colours at cold start (guide-notes.md §37). |
AppState memoryWarning |
onLowMemory |
renamed | Android: Coil’s memory cache is cleared for you. iOS: sent on the system’s memory warning; pictures sit in an NSCache, which gives memory back by itself, and image preloads pause for a minute. |
I18nManager.isRTL |
(await Os.info()).rtl |
renamed | start / end style keys follow it. Android: the app’s manifest needs supportsRtl. iOS: from the first preferred language. |
react-native-screenshot-prevent, FLAG_SECURE by hand |
route option secure: true |
different | Android: blocks screenshots while that route is on top (FLAG_SECURE). iOS can’t refuse a screenshot: screenshots, recordings and mirroring show the screen blank, and the app switcher shows a cover (platform differences). |
AppRegistry.registerHeadlessTask |
defineTask |
renamed | Called at the top of main.ts. A plugin starts it: ZnBackground.run in Kotlin, ZnTasks.shared.run in Swift; it gets a time limit and an AbortSignal. @zeronative/firebase-messaging runs its messages, new tokens and swipes as tasks. |
Keyboard.dismiss() |
Keyboard.dismiss |
same | Returns a Promise (RN: nothing); calling it without await is the same. |
Keyboard.addListener("keyboardDidShow" | "keyboardDidHide"), isVisible, metrics |
Keyboard |
same | On both platforms, as RN on Android: no Will events. One event per show or hide; height in dp from the bottom of the window. The route option keyboard: "resize" already moves the content. |
ToastAndroid.show |
ToastAndroid (also toast()) |
same | zero-native’s toast, also on iOS (its own pill there, at most two lines): above the keyboard, survives navigation. showWithGravity: the gravity is ignored. |
Self-update (CodePush, expo-updates) |
Updates |
different | Signed OTA bundles. See ota.md. |
Camera / QR scan (react-native-vision-camera, expo-camera) |
@zeronative/scanner |
different | QR and barcodes only, no photo or video. A full screen (route native: "scanner.full" + nav.pushForResult) or a view (<QrScanner>). Android: ML Kit, bundled; iOS: AVFoundation’s own code reader (no download; autoZoom ignored). |
Document scanner (react-native-document-scanner-plugin) |
@zeronative/document-scanner DocumentScanner |
different | scanDocument({ maxNumDocuments }) → { status: "success" | "cancel", scannedImages } as in RN, plus pages, pdf (formats: ["jpeg", "pdf"]), mode, galleryImport, tag, and statuses lost, unavailable, failed with a reason (RN rejects). scannedImages are zn://file handles, not paths: send pages[i].uri with FormData. No croppedImageQuality, no responseType: "base64". Android: ML Kit’s scanner, a Play services download (getStatus, download, onStatus). iOS: Apple’s document camera (VisionKit), with Vision cropping pages from Photos; a kill while its camera is open loses the scan (lost). After a kill: onResult. |
| Image / file picker, PDF | @zeronative/media |
different | Media.pickPhotos, pickFile, takePhoto, edit. Files come back as zn://file handles plus a file:// uri for upload. Results survive a kill (Media.onResult); on iOS a kill while a picker is open makes the pick lost, so ask again. |
PDF view (react-native-pdf-renderer, react-native-pdf) |
@zeronative/pdf |
different | <PdfView source> (scroll, pinch, double tap, maxZoom, pageGap, onPageChange, onError) and <PdfPreview> for a card (RN: singlePage, but fit to width). source is a zn://file handle, not a path: get one with Pdf.download({ url, headers, key }), which caches. No base64, password, share or links. |
Full-screen image viewer (react-native-image-viewing, react-native-image-zoom-viewer, a gesture-handler zoom screen) |
@zeronative/image-viewer ImageViewer.open |
different | A call, not a component: ImageViewer.open({ images, imageIndex }) opens the viewer (registry 24: a TSX screen on a transparent route, screen: ImageViewerScreen, with a flight from the thumbnail via from; before: a native route native: "imageviewer.full") and gives { index } when closed, in place of visible + onRequestClose. Same names: images: [{ uri }], imageIndex, swipeToCloseEnabled, doubleTapToZoomEnabled, backgroundColor; zoom-viewer’s index and { url } also work. Pinch 1x–5x (down to 0.8x, springs back), pan, double tap 2.5x, swipe between and to close, Back. Links: https (with per-picture headers), asset:, zn://file, content://, data:image/...;base64 up to 5 MB, and file:// only inside the app’s own folders (RN takes any path; refused here because a bundle comes over the air). iOS refuses content:// (an Android-only scheme). Headers and data: are kept in memory, so after a kill those pictures show an error. No HeaderComponent / FooterComponent, onLongPress, save, live onImageIndexChange. Added 2026-11-05. |
Push (@react-native-firebase/messaging) |
@zeronative/firebase-messaging Push |
different | FCM only; other push services feed the same onMessage through PushEvents (@zeronative/notifications, 2026-11-09). getToken answers { token, reason } (RN: throws). onMessage and setBackgroundMessageHandler are one: Push.onMessage runs for every data message in front, behind or closed, with inFront. onTokenRefresh also runs while the app is closed. Topics, deleteToken same. A messaging() object keeps RN’s names. getInitialNotification, onNotificationOpenedApp (taps on FCM’s own notifications; a tap on the app’s own Notifications.show opens its link through onLink), setAutoInitEnabled, requestPermission / hasPermission (Android 13 permission, answers AuthorizationStatus) same since native version 2. A data message zn_ota=check runs the OTA check natively. On iOS the plugin hands the APNs token to FCM; the server must send an alert push for iOS, and data-only messages arrive only while the app runs or as a rationed background wake (plugin README, platform differences). Not built: RN’s iOS-only JS calls (getAPNSToken, …). Added 2026-11-04. |
Local notifications (@notifee/react-native, expo-notifications) |
@zeronative/notifications Notifications (no Firebase; also re-exported by @zeronative/firebase-messaging) |
different | iOS: UNUserNotificationCenter, text only (HTML tags are taken out); Android-only calls (channels, exact alarms, battery) answer as Notifee does on iOS. requestPermission / hasPermission (2026-11-09), createChannel, show (Notifee’s displayNotification: big text, big picture, large icon, groups), cancel, cancelAll, canShow (Notifee’s getNotificationSettings + isChannelBlocked). Group summaries are kept for you. A tap opens link; with no link it calls Notifications.onPress({ id, data }) or answers Notifications.getInitialNotification() (Notifee’s PRESS event, native version 3); a swipe runs Notifications.onDismiss. Title and body take HTML like Notifee’s (native version 3). Since native version 2: action buttons with inline reply (onAction, Notifee’s ACTION_PRESS event), inbox lines, progress, ongoing, onlyAlertOnce, silent, badge number, timestamp, lock screen visibility (default private), category, color, channel groups, getChannels / getChannel, getDisplayed (Notifee’s getDisplayedNotifications). Scheduled notifications: schedule(options, { at, repeat, exact }) (Notifee’s createTriggerNotification with a timestamp trigger; no interval trigger), getScheduled, power checks and settings pages. Not built: foreground services, messaging style, full-screen intents. Added 2026-11-04. |
Firebase app and Installations (@react-native-firebase/app, /installations) |
@zeronative/firebase-app |
same | firebase.app() (a promise here; no options.apiKey), setDataCollectionDefault, installations().getId() / getToken() / delete(). Firebase is off, and calls answer “not available”, when the config file is missing: Android’s Gradle file checks google-services.json, iOS needs GoogleService-Info.plist and the Firebase SDK. Added 2026-11-04. |
Crash reports (@react-native-firebase/crashlytics) |
@zeronative/firebase-crashlytics |
same | Every JS error is sent by itself (RN: its global handler), with the JS stack, bundle and route keys. log, recordError(error, tag), setAttribute(s) (also numbers and booleans), setUserId, setCrashlyticsCollectionEnabled, crash. Map JS stacks with bun run ota symbolicate. Android: native crashes need firebase-crashlytics-ndk, opt-in. iOS: Crashlytics catches native crashes itself; upload each build’s dSYMs. Added 2026-11-04. |
Remote Config (@react-native-firebase/remote-config) |
@zeronative/firebase-remote-config |
same | setDefaults, setConfigSettings, fetch, activate, fetchAndActivate, ensureInitialized, getValue (sync: asString, asNumber, asBoolean, getSource), getAll, lastFetchStatus, onConfigUpdated, reset (answers false on iOS: iOS’s Firebase has no reset). Fetch calls answer { ok, reason, changed } instead of throwing. Added 2026-11-04. |
Performance (@react-native-firebase/perf) |
@zeronative/firebase-perf |
same | App start, every fetch (query left out) and a trace per screen with slow / frozen frames by themselves. startTrace, trace(name, fn), metrics, attributes, setPerformanceCollectionEnabled. Not built: newHttpMetric, newScreenTrace. Added 2026-11-04. |
Analytics (@react-native-firebase/analytics) |
@zeronative/firebase-analytics |
same | On by default, as in RN; setAnalyticsCollectionEnabled(false) to opt out. A screen_view per route by itself. logEvent, logScreenView, recommended events (logPurchase, logLogin, …), setConsent, user id and properties, getAppInstanceId. Calls answer true / false; no isAnalyticsCollectionEnabled. Added 2026-11-04. |
Markdown (react-native-markdown-display, a custom MarkDownView) |
@zeronative/markdown |
different | Since 2026-11-05, JS only. <Markdown text={md} onLinkPress={(url) => ...} /> and <MarkdownText numberOfLines={2}> for one-liners. Headings, lists, quotes, code, lines, bold, italic, strike, <u>, code, links. Looks change with style / styles (span keys), not custom components (rules, components overrides are missing). No HTML, no images, no tables. Links open only through onLinkPress. guide-notes §58. |
WebView (react-native-webview) |
@zeronative/webview |
different | <WebView> with allowedHosts, postMessage both ways, links that leave the app, cookies, file upload. Android: WebView; iOS: WKWebView. Debugging is opt-in (WebViewPlugin(inspect = true) in Kotlin, WebViewPlugin(inspect: true) in Swift). |
Lottie (lottie-react-native) |
@zeronative/lottie LottieView |
different | import LottieView from "@zeronative/lottie". RN’s props and defaults (autoPlay false, loop true, speed, progress, resizeMode, renderMode, colorFilters, the ...Android flags, cacheComposition) and events (onAnimationFinish(isCancelled), onAnimationFailure, onAnimationLoaded). ref (callback or useRef<LottieView | null>) with play(start?, end?), pause, resume, reset. Two edits: source is "asset:lottie/x.lottie" (or .json, or { uri } with that text), not require(...); the size goes on a View around it (style on it is a type error). “Remove animations” shows the last frame. Missing: network URLs, JSON objects, duration, imageAssetsFolder, text filters, onAnimationLoop. Added 2026-11-05 (guide-notes §57). |
| Phone number hint, SMS auto-read | @zeronative/android-play-auth |
different | Auth.phoneHint, Auth.listenForOtp. Every Play services failure gives a reason, never a crash: show “type it by hand”. iOS answers “unavailable” (no Play services, and apps can’t read SMS): there OtpInput / autoComplete="sms-otp" get the code from Messages. |
| UPI app list and launch | none | missing | Not in the framework: the app owns this plugin (plugins.md D7). ZnLaunch and launches do the hard part. The icon part is built on Android: <Image src="zn://app-icon/<package>" /> (ZnHandles.kt); iOS has no zn://app-icon. |
Location (@react-native-community/geolocation, expo-location) |
@zeronative/location |
different | Location.getCurrentPosition / watchPosition answer { position, reason } and never reject. A Geolocation object keeps RN’s names, callbacks and error codes 1/2/3. Fixes from Android’s LocationManager, not Play’s fused provider; on iOS from Core Location (one “while using” permission, never “always”). Google’s “Turn on location” dialog is Location.turnOn() (RN apps call Play’s SettingsClient in their own module; iOS has no such dialog: it answers “unavailable” while location is off); without Play services, Location.openSettings(). Timeout at most 60 s; a watch pauses while the app is hidden. Geocoder included. Added 2026-11-03. |
| Biometrics, contacts, maps, video | none | missing | Not planned yet. Permissions.request can ask for the permission, but no API uses it. |
@react-native-community/datetimepicker (date / time picker) |
none | missing | Parked by Pavan 2026-11-09 (planned: a plugin on Android’s own date and time dialogs). Until then: a Sheet with your own day / month / year choices. |
7. Opening another app for a result
Section titled “7. Opening another app for a result”| RN | zero-native | Status | How to move |
|---|---|---|---|
startActivityForResult in a custom module, ActivityEventListener.onActivityResult |
ZnLaunch.start in Kotlin + launches in JS |
different | The plugin (Kotlin) builds the Intent and starts it. JS gets the result through launches.onResult(key, handler). iOS has no activity results: another app answers by opening a link back to yours, and launches keeps the answers of native screens and of launches a Swift plugin starts itself (ZnLaunch.start / finish in ZnPlugins.swift). |
| Result lost if the app is killed while the other app is open | launches.pending(key), launches.ack(key, id) |
different | The result is saved on disk before JS hears it, and comes again at every start until you call ack. Write your handler so it is safe to run twice. guide-notes.md §31. |
| Start an activity from JS with any Intent | none (on purpose) | missing | JS can’t open any app with any data. Only a plugin’s Kotlin can (iOS has no Intents). |
| Native screen that returns a value | nav.pushForResult with a route native: "plugin.screen" |
different | Built. The scanner uses it. See §8. |
| Tell that the user came back, with no result | onAppState |
different | Act on "active", then ask your server. |
8. Native modules and plugins
Section titled “8. Native modules and plugins”| RN | zero-native | Status | How to move |
|---|---|---|---|
NativeModules.X / TurboModule spec |
nativeModule<T>("X", { version }) |
different | Declare a TS interface. Methods take one args object and return a Promise. No sync methods. When the screen closes, its calls are dropped quietly unless you pass owned: false (CallOptions). |
Native method with Promise |
ZnModuleBase + function("name") { call -> call.resolve(...) } |
different | Kotlin on Android, Swift on iOS (function("name") { call in call.resolve(...) }, the same contract). Read args with call.string("x"), call.int("n") (Swift: try); a wrong type rejects with invalid_args. native-modules.md. |
NativeEventEmitter / DeviceEventEmitter |
handle.on("event", fn) / onNativeEvent |
renamed | Declare events in the interface (events: { tick: number }). |
| Module available on old app builds | module version in nativeModule(...) |
different | An app whose APK has an older native module ignores the bundle (a safety rule for OTA). Raise the version when TS needs new native code. |
| Native binary data (base64 strings) | BytesResult (calls.ts) |
different | Bytes cross as ArrayBuffer, not base64. |
Autolinking (react-native.config.js, CLI) |
ZnPlugins.register(this, MyPlugin()) in Application.onCreate; on iOS ZnPlugins.register(MyPlugin()) in the app delegate |
different | By hand today: Gradle dependency (iOS: the plugin’s SwiftPM product, or APP_ZN_PLUGINS in CMake) + one line. Autolinking is decided for later (D1). plugins.md §8. |
A library package with android/ + src/ |
plugin package with android/, ios/ and src/ (plugins/device-test is the sample) |
renamed | ZnPlugin registers modules (Swift: ZnPlugin in ZnPlugins.swift). zeroNative.platforms in its package.json lists its OSes. Guide: guide-notes.md §30. |
requireNativeComponent / Fabric native view |
<NativeView name="plugin.view"> + r.view(...) in Kotlin or Swift |
different | A Compose composable on Android, a UIView on iOS. Props are one JSON value; events come as { name, data }. The name must be a literal, and its plugin’s nativeModule must be in the bundle. |
| Native screen (a native Activity opened for a result) | route native: "plugin.screen" + r.screen(...) |
different | A composable on Android, a UIViewController on iOS. Joins the normal back stack. nav.pushForResult gives the answer, onNavResult after a kill. |
| Codegen (TS spec → Kotlin / Swift) | none | missing | You write the Kotlin and the Swift by hand. Planned only when needed (D2). |
react-native-otp-entry (OtpInput) |
OtpInput |
same | Built in (registry 18, 2026-11-06, guide notes §62): the same props, ref (setValue) and theme (written in place, known at build time). A paste keeps the allowed characters; zn adds error. textProps isn’t supported. |
| JS-only npm libraries | allowed if they use no React and no RN modules | different | A plugin that is plain TS can import @zeronative/core / ui. Anything using React hooks, View or Platform must be rewritten. |
9. React and JS-side patterns
Section titled “9. React and JS-side patterns”| RN / React | zero-native | Status | How to move |
|---|---|---|---|
useState |
signal |
renamed | const [a, setA] = useState(0) → const a = signal(0); read a(), write a.set(1). |
useMemo |
computed |
renamed | |
useEffect |
effect, onCleanup |
different | Runs when the signals it read change. No dependency array. A component body runs once. Return a cleanup function as in RN (since 2026-11-05): it runs before the next run and when the screen closes (second-opinions 114). |
useRef for a TextInput |
createRef |
different | ref={r} on TextField only (§1). |
useRef for a value |
useRef |
same | Since 2026-11-05: { current }, kept for the component’s life; changing it redraws nothing (use a signal for that). |
forwardRef, useImperativeHandle |
none | missing | A screen body runs once: a plain let or a signal does it. |
useContext |
module-level signals / imports | missing | No context. Share state through a module. |
useReducer, Redux, Zustand |
signals + plain modules | different | Stores that need React hooks do not work. A plain store (Zustand vanilla) can be wrapped in a signal. |
useCallback |
useCallback |
same | Since 2026-11-05: the function itself (a body runs once). React.memo: not needed, delete it. useMemo: not given on purpose (it would never compute again): use computed. |
useWindowDimensions |
useWindowDimensions |
different | See §1. Read it inside JSX or effect. |
useColorScheme |
useColorScheme |
different | See §6. |
Conditional render cond && <X/>, cond ? <A/> : <B/> |
same | same | compile.ts, conditional rendering. A branch must be JSX or null; nested ternaries work. return c ? <A/> : <B/> works (guide notes §47). |
A value worked out in the body and shown: const missing = p.amount <= 0 |
computed, or read it in the JSX |
different | A body runs once. Where the value can change, the app build fails with the fix (2026-11-05, guide notes §61): a signal read, or a child’s props that can change while it stays mounted. Fine in a screen (route params) and in a .map / List row (a row mounts again). |
Early return in a child: if (loading()) return <Spinner /> |
same | same | Rewritten at build time into branch components (batch 2, 2026-11-08). Top-level guards extract the tail into a child component (Card__after1), mounting via nested ternary. Code after the guard runs fresh each time, preventing crashes on unready data. Returns inside loops, try, switch, or nested blocks stay build errors. |
Destructured props function Row({ title, size = "md" }) |
same | same | Rewritten at build time to Row(__p) reading live from __p (batch 1, 2026-11-08). Renaming ({ title: t }) and literal/constant defaults supported. ...rest, nested patterns, array patterns, and reassignments stay build errors. |
return null from a child |
same | same | Draws nothing, as in React (2026-11-05; was an error that left the part empty). |
async function Comp() |
none | missing | A build error: load in an effect, keep it in a signal, show {data() ? ... : <Spinner />}. |
JSX in a variable: const header = <X/>, const badge = c ? <A/> : null |
same | same | Built (compiler pack, 2026-11-04, guide notes §47). Use it in JSX only (child, prop, return); each use is its own copy. let reassigned and items.push(<X/>) are build errors with a hint: one ternary, or .map. |
Early return in a screen: if (loading) return <Spinner />, if (!user) return null |
same | same | Supported since batch 2 (2026-11-08). Top-level guards rewrite to a single return ternary mounting branch components, satisfying the single-template manifest invariant. Refused shapes (switch, loop, try) still fail. |
Component props, children |
same | different | {props.children} shows them; reading, mapping or counting children is not supported. Spread props {...p} are a build error. |
| Custom hooks | plain functions | different | A function that makes signals in a screen body works. |
Intl.NumberFormat etc. |
same | same | guide-notes.md §25. |
10. The ten items that would cost a migration the most
Section titled “10. The ten items that would cost a migration the most”Ordered by the work they usually cause. “Missing” and “different” items only.
- Runtime changes to layout values (different).
width,height,margin,flex,fontSize,borderRadiusmust be known at build time. Any RN screen that sets these from state needs a redesign: two styles and a ternary, or ananimateprop. Touches almost every non-trivial screen. (§0) This also hits a value passed in as a component prop:style={{ height: props.height }}is a build error, even when every caller passes a literal. Common in design-system atoms (button heights, icon sizes). The zero-native way:.svgicons take a literalsizewhere they are used, and atoms list named sizes and pick one with a ternary (guide notes §47). A compiler pass that would do this for free numbers was planned and dropped (second-opinions 100). Constants in a component body and math on constants (SIZE / 2,COMPACT ? 40 : 48) are build-time values now. - No React (missing). Every
useState,useEffect,useRef,useContext,useMemo, and every hook-based library (React Query, Formik, React Hook Form, most state libraries) must be replaced. This is a rewrite of screen logic, not an edit. (§9) - Navigation: no header bar, no drawer, no nested navigators (missing). Bottom tabs and focus events are built
(
useTabs,useFocus, 2026-11-03), but a header and a drawer must still be built by hand in your screens, and a tab can’t hold its own stack. (§3) ScrollView/FlatListfeatures (different / missing). NoSectionList(numColumnsgrids came in registry 24). (onScroll, snapping andscrollTo/ refs onScroll: registry 24.) Apps with grids need a new design. Built: pull to refresh (RefreshControl, registry 12), sticky rows (stickyHeaderIndices, registry 15),inverted(19), horizontalList,ListHeaderComponent/Footer/Emptyand aListref/controllerwithscrollToIndex/scrollToEnd/scrollToOffset(23), scroll offset for animation throughuseElementMotion()andkeyboardDismissMode(24). (§1)TextInputcontrol (missing, partly built).ref.focus()/blur()/clear()are built (RN basics pack), so OTP boxes and “jump to next field” port with small edits.autoCompleteis built (registry 17). Still noonKeyPress, no selection API. (§1)- Third-party native libraries (missing). Every RN native library (camera, maps, WebView, push, file system,
biometrics, image picker) has no zero-native twin yet, except the official plugins: scanner, auth, WebView, media, PDF,
location, push, Lottie, document scanner, image viewer, and Firebase (crashlytics, analytics, remote-config, perf). Maps, biometrics and video are still missing. A native view or screen is now a plugin’s
r.view/r.screen. (§6, §8) - Other apps and results through JS (different).
Linking.openURLopens any app’s link as in RN (since 2026-11-08). Starting an app for a result (a UPI payment’s answer) or anintent:link needs a Kotlin plugin; results come back throughlauncheswithack. On iOS the other app answers with a link back. (§6, §7) - Styling gaps (missing). No per-side border colours. (
textTransform, per-corner radius,ImagetintColorand the iOS shadow keys came in RN props pack 2;flexWrapon a Row andfontFamilywith app fonts in registry 24, 2026-11-09.) Designs that use them need a workaround or a framework change. (§2) - Animation model (different). No
Animated.Value. Since registry 24 (2026-11-09), motion values, compiledderiveformulas and native gestures cover Reanimated + gesture-handler: drag-to-dismiss, parallax, snap points, shared elements, reorder (motion.md, §12). Worklets with custom logic becomederiveor a native plugin source. (§1) - Small OS APIs and web globals (mostly built). The RN basics pack added
Alert,Clipboard,Dimensions,Platform,NetInfo,URL,atob/btoa(Hermes) andrequestAnimationFramewith their RN names; dark mode came in P.6.WebSocketadded in batch 1 (text-only, 1 MB cap). Still missing:XMLHttpRequest. The import line changes to@zeronative/core. (§1, §5, §6)
Two more compiler rules were found by the ZeroBill pilot-flow audit (2026-11-03); the compiler pack (2026-11-04) settled them:
- JSX in variables: built.
const header = <X/>andconst body = c ? <A/> : <B/>work (guide notes §47). Still build errors, each with a hint: aletassigned again (use one ternary) anditems.push(<X/>)(use.map). - No NativeWind / Tailwind
className: not planned. Every class must be rewritten as astyleobject; apps built with NativeWind have hundreds of them. zero-native keeps one styling system (second-opinions 103), and no port tool is planned.
Not planned (framework non-goals, 2026-11-08, Pavan + Opus). Each has a build error or a doc line that says what to write instead:
- React hook libraries (react-query, zustand, jotai, react-hook-form, formik): zero-native uses signals. Rewrite
their use with
signal/computed/effect. - NativeWind / Tailwind
className(above). XMLHttpRequest: usefetch(it has upload and download progress), or axios’s fetch adapter.- Layout keys from a signal:
flexDirection,flexWrap,alignItems,justifyContent,alignSelf,positionpick the container at build time. Usecond ? <Row>...</Row> : <Column>...</Column>. - Early returns inside
switch, loops ortry: use if / else, or a lookup. - Render props and function children (
render={(n) => <X/>},{(n) => ...}as children): lists have their ownrenderItem; elsewhere pass the data and render inside the component. Revisit if a real port needs many. - A style passed in from outside (
style={props.style},style={[base, props.style]},style={on ? s.a : s.b},style={sizeFor(20)}) and spread props (<Pressable {...rest}>): a template knows its style keys at build time, so a wrapper says what it varies:style={{ marginTop: props.gap }},{ color: on ? a : b }, or two elements. Pavan, 2026-11-08: “why should we do unnecessary things.. given ideology of our framework”. A runtime style bag would cost a binding and a native state per style key on every wrapper (65 per node in a List of cards).
Smaller known gaps not in the list: Button, StyleSheet.flatten. (testID,
Image events, Modal, StatusBar, pointerEvents, hitSlop, onLayout came in RN props pack 2, guide-notes §43.)
11. What the reference app uses most (ZeroBill)
Section titled “11. What the reference app uses most (ZeroBill)”Rough counts of member uses in ZeroBill’s React Native app (2026-11-03), to order the work. The small APIs are built now (RN basics pack); the right column says how a use ports.
| API | Uses | Ports as |
|---|---|---|
Platform.OS / Version / select |
94 / 3 / 1 | same |
Linking.openURL |
18 | same (whatsapp: too, since 2026-11-08); the UPI launch with its result goes through a plugin |
AppState.currentState / addEventListener |
13 / 13 | same |
Keyboard.addListener / isVisible / metrics |
6 / 4 / 3 | same |
Alert.alert |
8 | same |
Dimensions.get / useWindowDimensions |
6 / 4 | different: values that size a layout must become flex or % |
NetInfo.fetch / addEventListener |
4 / 2 | same (import line changes) |
Vibration.vibrate |
4 | same; for a tap feel prefer Os.haptic("light") |
ToastAndroid.show |
3 | same |
Clipboard.setString |
3 | same (import line changes) |
Share.share |
2 | same |
BackHandler.addEventListener |
3 | renamed: useBack |
Linking.getInitialURL / addEventListener |
1 / 1 | different: the app’s link router becomes routes with deepLink + onLink |
<StatusBar barStyle> |
2 | same (registry 15); the “only while focused” trick isn’t needed |
react-native-otp-entry (login) |
1 screen | same: <OtpInput> (registry 18, guide-notes §62) |
12. Gestures and motion: porting table
Section titled “12. Gestures and motion: porting table”From react-native-gesture-handler v2 and Reanimated 3 / 4. Our own short names; no aliases (plan D10). Details: motion.md.
| RN | zero-native | Notes |
|---|---|---|
useSharedValue(0) |
useMotion(0) |
Native-owned; v() reads in JS, v.peek() without subscribing |
withTiming, withSpring, withDecay |
v.to(x, timing), v.decay({ velocity, clamp }) |
Reanimated’s spring numbers are accepted as they are |
withSequence, withRepeat, withDelay |
v.sequence([...], { repeat, reverse }), { delay } |
|
cancelAnimation(v) |
v.stop() |
Promises resolve { finished } in order |
| finish callback | await v.to(...) |
|
withClamp, overshootClamping |
{ spring, overshootClamp: true }, decay({ clamp }) |
|
useDerivedValue(() => withSpring(x.value)) |
follow(x, "spring") |
|
useDerivedValue(() => maths) |
derive(() => maths) |
Read values as x(); compiled, ≤ 64 steps |
useAnimatedStyle |
bind values in style |
opacity, transform, backgroundColor, radii, blurRadius, cameraDistance |
interpolate, Extrapolation |
v.map(in, out, "clamp" | "extend" | "identity"), interpolate in derive |
|
interpolateColor |
v.mapColor(in, colours), interpolateColor in derive (last step) |
|
useAnimatedProps on text |
<Text>{v.format({ prefix: "₹" })}</Text> |
Indian grouping by default |
useAnimatedProps on SVG |
Svg part fill, stroke, trims, transforms take values |
|
useAnimatedProps on a native view |
<NativeView props={{ level: v }}> + scope.motion("level") |
Plugin side |
useAnimatedScrollHandler, useScrollViewOffset |
useElementMotion() + <Scroll motion={m}> → m.scrollY |
List: index, offset, scrollY |
scrollTo in a worklet |
m.follow(v) |
Scroll, List, Carousel |
useAnimatedRef + measure |
m.measure(), or m.x / y / width / height per frame |
|
useAnimatedKeyboard |
env.keyboardHeight |
Route keyboard: "none" to place things yourself |
KeyboardGestureArea / iOS keyboardDismissMode="interactive" |
<List keyboardDismissMode="interactive"> (also Scroll) |
The keyboard follows the finger; Android 11+. iOS: the interactive dismissal (UIKit’s on the default List, SwiftUI’s on a Scroll) on a vertical scroll (“on-drag” on a horizontal one), with no frames to JS keyboard listeners |
useWindowDimensions in worklets |
env.width, env.height, self.*, parent.* |
|
useAnimatedSensor(GRAVITY) |
useTilt() |
x / y from -1 to 1 |
useFrameCallback |
useFrame (JS) or a plugin ZnMotionApi.onFrame (native) |
|
useAnimatedReaction, runOnJS |
gesture events, v() in an effect |
Coalesced to one message per frame |
useReducedMotion |
automatic: the system setting | |
entering / exiting (FadeIn, SlideInLeft, ZoomIn, BounceIn, FlipInX, StretchInX) |
enter / exit presets |
"fade", "slide-left", "zoom", "bounce", "flip-x", "stretch-x"… |
layout={LinearTransition}, Layout.springify() |
animateLayout="spring" |
|
itemLayoutAnimation (FlatList) |
<List itemAnimation="fade"> |
|
sharedTransitionTag |
sharedTag |
Scrubbed by predictive back |
Gesture.Pan() |
usePan({...}) |
Options instead of callbacks per frame |
.activeOffsetX, .failOffsetY, .minDistance, .minPointers, .activateAfterLongPress |
same option names | |
.onUpdate moving a value |
bounds, anchors, magnets, rubber |
Snap logic in onEnd becomes anchors + release |
Gesture.Pinch(), Gesture.Rotation() |
usePinch, useRotate |
scale, focalX/Y, angle |
A pinch + pan + double-tap zoom built by hand (react-native-zoom-toolkit, react-native-image-zoom) |
useZoom({ max, doubleTap, aspect }) |
scale, x, y; edges, fling, rubber band and the hand-off to a pager built in (registry 24) |
Gesture.Tap().numberOfTaps(2), Gesture.LongPress(), Gesture.Fling() |
useTap({ taps: 2 }), useLongPress, useFling |
|
Gesture.Simultaneous / Exclusive / Race |
Gesture.simultaneous / exclusive / race |
|
simultaneousWithExternalGesture, requireExternalGestureToFail |
simultaneousWith, requireToFail |
|
manualActivation + stateManager.activate() |
manualActivation: true + Gesture.activate(g) |
One JS round trip |
GestureDetector |
gesture={g} on any element |
|
Swipeable, DrawerLayout, bottom-sheet, carousels, zoom views |
labs built from these pieces | Examples in examples/sample/src/Motion*Lab.tsx |
react-native-draggable-flatlist |
<List reorderable onReorder> |
|
Gesture.Native, Gesture.Manual, Hover, ForceTouch |
none | Not phone gestures, or not needed |
| worklet runtimes on other threads (frame processors) | native plugins | The scanner does QR natively |
12.1 Not built yet (later work, not blocking ZeroBill)
Section titled “12.1 Not built yet (later work, not blocking ZeroBill)”Gaps against the RN gesture and animation libraries, listed by the motion v1.1 session on 2026-11-09 from its work and the docs (not re-checked in code). Pavan: write them down as later work. Suggested order: useInk and A6 first (signatures, chart and icon morphs); worklets are a design question, not a quick add.
| Gap | What RN has | Today in zn |
|---|---|---|
| Worklets (the big one) | Own JS on the UI thread | Only options and derive formulas (≤ 64 steps, Math.*, no own functions). Anything else is one JS message per frame (onUpdate) or a round trip (manualActivation). Custom physics and game-like logic don’t fit |
| A6: SVG path morph | redash interpolatePath, animated d |
None |
| A8: shared element into a Sheet, Modal or see-through screen | sharedTransitionTag anywhere |
Screen to screen only; the image viewer uses a measured box |
| Layout keys per frame | Any style key in useAnimatedStyle |
Only width / height follow a motion value; not margin, padding, top / left, flex |
| C3 useInk: finger drawing, signature pad | Skia + pan | None |
| Gesture kinds | Hover, ForceTouch, raw touches on the UI thread (Gesture.Manual, onTouchesMove) |
None |
| Sensors | useAnimatedSensor (gyroscope, rotation vector, …) |
Gravity tilt only (useTilt) |
| Skia extras | Shaders (SkSL), text measuring from JS, snapshot to an image, Atlas, Picture recording, video frames | None. Gradients, dash, path data and text layout can’t follow a motion value |
| Libraries | Rive, maps with gestures, @gorhom bottom-sheet, FlashList, SectionList | Our Sheet and List only (grids: rn-gaps-pack). List offset is an estimate past measured rows |
| Platform | Both | iOS runs §12 on the simulator, with the engine on in every build since the motion gate (2026-11-24, docs/motion.md); not yet on an iPhone. Pinch, rotate, the edge-back band, TalkBack and frame timings not yet proven on the Lava |