MyGit

react-native-webview/react-native-webview

Fork: 3011 Star: 6622 (更新于 2024-12-12 00:32:02)

license: MIT

Language: TypeScript .

React Native Cross-Platform WebView

最后发布版本: v13.12.1 ( 2024-08-31 04:10:43)

官方网址 GitHub网址

React Native WebView

star this repo PRs Welcome NPM Version Npm Downloads

React Native WebView is a community-maintained WebView component for React Native. It is intended to be a replacement for the built-in WebView (which was removed from core).

Maintainers

Many thanks to these companies for providing us with time to work on open source.
Please note that maintainers spend a lot of free time working on this too so feel free to sponsor them, it really makes a difference.

Windows and macOS are managed by Microsoft, notably:

Shout-out to Jamon Holmgren from Infinite Red for helping a lot with the repo when he had more available time.

Disclaimer

Maintaining WebView is very complex because it is often used for many different use cases (rendering SVGs, PDFs, login flows, and much more). We also support many platforms and both architectures of react-native.

Since WebView was extracted from the React Native core, nearly 500 pull requests have been merged.
Considering that we have limited time, issues will mostly serve as a discussion place for the community, while we will prioritize reviewing and merging pull requests.

Platform compatibility

This project is compatible with iOS, Android, Windows and macOS.
This project supports both the old (paper) and the new architecture (fabric).
This project is compatible with expo.

Getting Started

Read our Getting Started Guide. If any step seems unclear, please create a pull request.

Versioning

This project follows semantic versioning. We do not hesitate to release breaking changes but they will be in a major version.

Usage

Import the WebView component from react-native-webview and use it like so:

import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { WebView } from 'react-native-webview';

// ...
const MyWebComponent = () => {
  return <WebView source={{ uri: 'https://reactnative.dev/' }} style={{ flex: 1 }} />;
}

For more, read the API Reference and Guide. If you're interested in contributing, check out the Contributing Guide.

Common issues

  • If you're getting Invariant Violation: Native component for "RNCWebView does not exist" it likely means you forgot to run react-native link or there was some error with the linking process
  • If you encounter a build error during the task :app:mergeDexRelease, you need to enable multidex support in android/app/build.gradle as discussed in this issue

Contributing

Contributions are welcome, see Contributing.md

License

MIT

Translations

This readme is available in:

最近版本更新:(数据更新于 2024-08-31 17:16:00)

2024-08-31 04:10:43 v13.12.1

2024-08-26 16:28:19 v13.12.0

2024-08-20 22:58:53 v13.11.1

2024-08-20 22:56:07 v13.11.0

2024-08-20 22:54:19 v13.10.7

2024-08-20 22:36:54 v13.10.6

2024-07-08 16:09:04 v13.10.5

2024-06-22 02:44:27 v13.10.4

2024-06-05 02:57:20 v13.10.3

2024-05-12 06:43:00 v13.10.2

react-native-webview/react-native-webview同语言 TypeScript最近更新仓库

2024-12-21 21:40:12 lobehub/lobe-chat

2024-12-21 12:01:51 siyuan-note/siyuan

2024-12-21 10:57:01 ai16z/eliza

2024-12-21 09:15:35 MetaCubeX/metacubexd

2024-12-21 04:50:26 mediar-ai/screenpipe

2024-12-20 19:36:48 vitejs/vite