1.0.6 • Published 5 years ago

axa-rn-web-view v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

AXA React Native Web View

A middleware for react-native-web-view. This package will help you locally embedded Static HTML site for your react native project.

Installation

npm i axa-rn-web-view --save

Usage

Import the AxaWebView component from axa-rn-web-view and use it like so:

import React, { Component } from 'react';
import { Platform, StyleSheet, View, SafeAreaView } from 'react-native';
import AxaWebView from 'axa-rn-web-view';

export default class App extends Component {
  onHandleNavigationChange = values => {
    console.log(values);
  };

  render() {
    const sourceUri =
      (Platform.OS === 'android' ? 'file:///android_asset/' : '') +
      'Web.bundle/loader.html';

    return (
      <View style={styles.container}>
        <SafeAreaView style={styles.container}>
          <AxaWebView
            javaScriptEnabled={true}
            originWhitelist={['*']}
            sourceUri={sourceUri}
            allowFileAccess={true}
            handleNavigationChange={this.onHandleNavigationChange}
          />
        </SafeAreaView>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1
  }
});

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

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago