react-native-webview-invoke
react-native-webview-invoke copied to clipboard
Invoke functions between React Native and WebView
``` let _refWebview = React.useRef() let invoke = createInvoke(() => _refWebview.current) React.useEffect(() => { // 暴露方法给 H5 invoke.define('route', setRoute) return () => {} }, []) return ( { const {...
我这边有问题请教您?
Hi @pinqy520 , thanks for the great work 👍 I need some help invoking functions with Promise as return Value. Any idea of how we can handle such use case?
import { StackHeaderOptions } from '@react-navigation/stack/lib/typescript/src/types'; import React, { useCallback, useContext, useEffect, useRef } from 'react'; import { View, Platform, StatusBar, Keyboard, BackHandler, KeyboardEvent, NativeModules, StatusBarStyle, AppState, AppStateStatus } from...
 已经引入了es6-promise.auto.min.js,但还是报错
cannot invoke anything. syntax is obscure, no editor, even compiler cannot solve that syntax. A and B confusion (can be native and browser), is it compiled from TypeScript? Should be...
I can easily expose functions from Native to be called by WebView but it's not possible to do the the opposite . I checked the invoke.fn but it returns an...