{"library":"react-native-webview","title":"React Native WebView","description":"React Native WebView is a community-maintained component designed to embed web content within React Native applications across iOS, Android, macOS, and Windows platforms. It serves as a direct replacement for the WebView component that was previously part of the React Native core, which has since been removed. The current stable version is 13.16.1, with frequent patch and minor releases addressing bugs and adding features, typically on a monthly to bi-monthly cadence. Key differentiators include its broad platform support, compatibility with both the old (paper) and new (fabric) React Native architectures, and official support for Expo. The project actively merges pull requests, demonstrating ongoing development, though explicit support for issues is often community-driven due to the inherent complexity and diverse use cases of WebViews. The library adheres to semantic versioning, introducing breaking changes only in major version bumps.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install react-native-webview"],"cli":null},"imports":["import { WebView } from 'react-native-webview';","import type { WebViewProps } from 'react-native-webview';","import type { WebViewMessageEvent } from 'react-native-webview';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { WebView } from 'react-native-webview';\n\nconst MyWebComponent = () => {\n  return (\n    <View style={styles.container}>\n      <WebView \n        source={{ uri: 'https://reactnative.dev/' }}\n        style={styles.webview}\n        onLoad={() => console.log('WebView loaded!')}\n        onError={(syntheticEvent) => {\n          const { nativeEvent } = syntheticEvent;\n          console.warn('WebView error: ', nativeEvent.description);\n        }}\n      />\n    </View>\n  );\n};\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    marginTop: 20, // Adjust for status bar\n  },\n  webview: {\n    flex: 1,\n  },\n});\n\nexport default MyWebComponent;","lang":"typescript","description":"This example demonstrates how to render a basic WebView displaying the React Native documentation website. It includes basic styling, a load event handler, and an error handler.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}