Skip to main content

Status

@rootnative/web is in early alpha. The API can change between alpha releases. This page lists what exists, so nothing on this site reads as a promise.

The latest release is 0.0.0-alpha.6 on npm. The changelog lists the changes in each release.

What ships today​

GroupExports
ComponentsView, Text, Image, Pressable, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, Button, ScrollView, FlatList, RefreshControl, TextInput, Switch, ActivityIndicator, Modal, KeyboardAvoidingView, StatusBar
APIsStyleSheet, Platform, Dimensions, useWindowDimensions, Appearance, useColorScheme, AppState, Keyboard, Linking, Alert, Share, Vibration, Clipboard, AccessibilityInfo, I18nManager, BackHandler, PixelRatio, processColor, PanResponder, Animated, Easing, usePressability
Compatunstable_createElement, findNodeHandle, TurboModuleRegistry, and the entries @rootnative/web/assets-registry and @rootnative/web/style. Libraries import them, your app doesn't.
Web layerHead, from @rootnative/web/dom
ServercreateStyleRegistry, StyleRegistryProvider, renderStyleTags, styleTagsHTML, StyleRegistry, from @rootnative/web/server. See Server rendering.
Toolingrootnative(), the Vite plugin, from @rootnative/web/vite, and @rootnative/web-expo, for an Expo app, also with Expo Router

FlatList renders every item. It has no virtualizer yet, so keep long lists short for now.

Planned, not written​

Don't import these yet. They aren't in the package.

  • Lists and motion: a virtualizer for FlatList, SectionList, VirtualizedList, LayoutAnimation, and the rest of Animated.
  • Tooling: a Next.js plugin, and templates for a Vite app with and without server rendering.

Out of scope​

  • The react-native-web internals. Only @rootnative/web-expo has its file layout, for Expo's bundler.
  • Metro with no Expo. A Metro plugin isn't planned for 1.0.
  • React 18, CommonJS, and Flow.
  • Props that React Native doesn't have, except a small web-only set. Each page marks a web-only prop.

How it's tested​

Every component and API has tests. They run in real browsers through Vitest browser mode, not in a simulated DOM: Chromium, Firefox, and WebKit, the engine of Safari.