raininfall/react-native-x5

如何使用

zzq1023 opened this issue · 1 comments

集成后,不知道如何在js正确调用

这个之前我自己用的,已经不用了,文档没那么详尽,我自己都忘了。
看代码应该是:
Component暴露有3个属性:
enableJavaScript: PropTypes.bool,
enableJavaScriptCanOpenWindowsAutomatically: PropTypes.bool,
enableWideViewPort: PropTypes.bool,
名字是对应Webview的Setting的函数

地址加载时使用函数 load

class Web extends Component {
  componentDidMount() {
    this.web.load('https://www.baidu.com');
  }
  render() {
    return (
      <Web ref={ref => this.web = ref} />
    );
  }
}