4.0.3 • Published 10 months ago

@portal-hq/webview v4.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Portal React Native WebView

The @portal-hq/webview package exports a single WebView component for loading dApps within your app with built-in Portal Provider injection.

Dependency linking

Because this package uses the react-native-webview package (which contain native modules) there is some additional linking required to make it work with your React Native project.

Explicitly install the react-native-webview package in your project.

yarn add react-native-webview

# OR #

npm install --save react-native-webview

Using the WebView Component

To use the WebView component, import it from the @portal-hq/webview package and use it as you would the react-native-webview package and render the component within your app.

import WebView from '@portal-hq/webview'

const App = () => {
  return <WebView url={'https://app.uniswap.com/'} />
}

Optional Props

The WebView component two optional props that can be used to customize the behavior of the WebView.

onNavigationStateChange

This allows you to provide a callback for when the navigation state changes. This allows you to manage loading states and other navigation events.

onSigningRequested

This allows you to provide a callback for when signing is requested. For the most part, this prop is not needed if you have already set up the PortalProvider in your app.

4.0.3

10 months ago

4.0.2

11 months ago

4.1.0-beta

1 year ago

4.1.0-beta-3

1 year ago

4.1.0-beta2

1 year ago

4.0.1

12 months ago

4.0.0

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.14

2 years ago

2.0.13

2 years ago