react native webview invoke:在React Native和WebView之间调用功能 源码

would6925 27 0 ZIP 2021-02-08 19:02:28

react-native-webview-invoke 直接在React Native和WebView之间调用功能 就像: // Side A const answer = await ask ( question ) // Side B function ask ( question ) { return 'I don\'t know' } 像这样使用之前,您应该首先定义要公开的功能。 // Side A const ask = invoke . bind ( 'ask' ) // Side B invoke . define ( 'ask' , ask ) 安装 $ npm ins

用户评论
请输入评论内容
评分:
暂无评论