https://necolas.github.io/react-native-web/docs/
Compatibility: React Native >= 0.63.
"React Native for Web" makes it possible to run React Native components and APIs on the web using React DOM.
High-quality web interfaces: makes it easy to create fast, adaptive web UIs in JavaScript. It provides native-quality interactions, support for multiple input modes (touch, mouse, keyboard), optimized vendor-prefixed styles, built-in support for RTL layout, built-in accessibility, and integrates with React Dev Tools.
Write once, render anywhere: interoperates with existing React DOM components and is compatible with the majority of the React Native API. You can develop new components for native and web without rewriting existing code. React Native for Web can also render to HTML and critical CSS on the server using Node.js.
Who is using React Native for Web in production? Twitter, Expo, Major League Soccer, Flipkart, Uber, The Times, DataCamp.
Browser support: Chrome, Firefox, Edge, Safari 7+, IE 10+.
Components and APIs deprecated in React Native are not supported by React Native for Web.
Quick start
The easiest way to get started is to edit this CodeSandbox template. You don’t need to install anything to try it out.
Documentation
The documentation app covers installation, configuration, APIs, and guides.
The React Native documentation contains more information about the Gesture Responder system, animations, and other design details.
Libraries and integrations
List of React Native packages with known web compatibility:
Examples of using React Native for Web with other web tools:
Compatibility with React Native
React Native v0.60
Components
Name | Status | Notes |
---|---|---|
ActivityIndicator | ✓ | |
Button | ✓ | |
CheckBox | ✓ | |
FlatList | ✓ | |
Image | ✓ | Missing multiple sources (#515) and HTTP headers (#1019). |
ImageBackground | ✓ | |
KeyboardAvoidingView | (✓) | Mock. No equivalent web APIs. |
Modal | ✓ | |
Picker | ✓ | |
Pressable | ✓ | |
RefreshControl | ✘ | Not started (#1027). |
SafeAreaView | ✓ | |
ScrollView | ✓ | Missing momentum scroll events (#1021). |
SectionList | ✓ | |
StatusBar | (✓) | Mock. No equivalent web APIs. |
Switch | ✓ | |
Text | ✓ | Missing onLongPress (#1011) support. |
TextInput | ✓ | Missing rich text features (#1023), and auto-expanding behaviour (#795). |
Touchable | ✓ | Includes additional support for mouse and keyboard interactions. |
TouchableHighlight | ✓ | |
TouchableNativeFeedback | ✘ | Not started (#1024). |
TouchableOpacity | ✓ | |
TouchableWithoutFeedback | ✓ | |
View | ✓ | |
VirtualizedList | ✓ | |
YellowBox | (✓) | Mock. No YellowBox functionality. |
Modules
Name | Status | Notes |
---|---|---|
AccessibilityInfo | (✓) | Mock. No equivalent web APIs. |
Alert | ✘ | Not started (#1026). |
Animated | ✓ | Missing useNativeDriver support. |
Appearance | ✓ | |
AppRegistry | ✓ | Includes additional support for server rendering with getApplication . |
AppState | ✓ | |
BackHandler | (✓) | Mock. No equivalent web APIs. |
Clipboard | ✓ | |
DeviceInfo | (✓) | Limited information. |
Dimensions | ✓ | |
Easing | ✓ | |
Geolocation | ✓ | |
I18nManager | ✓ | Includes additional support for runtime switch to RTL. |
InteractionManager | (✓) | |
Keyboard | (✓) | Mock. |
LayoutAnimation | (✓) | Missing translation to web animations. |
Linking | ✓ | |
NativeEventEmitter | ✓ | |
NativeMethodsMixin | ✓ | |
NativeModules | (✓) | Mocked. Missing ability to load native modules. |
PanResponder | ✓ | |
PixelRatio | ✓ | |
Platform | ✓ | |
Settings | ✘ | No equivalent web APIs. |
Share | ✓ | Only available over HTTPS. Read about the Web Share API. |
StyleSheet | ✓ | |
UIManager | ✓ | |
Vibration | ✓ | |
useColorScheme | ✓ | |
useWindowDimensions | ✓ |
from https://github.com/necolas/react-native-web
No comments:
Post a Comment