Using expo with WebView Bridge(npm) in react native (QUESTION)

Hi , I have been using expo for a while and I need to add a button on a webview , so found out we can use react native webview bridge (react-native-webview-bridge - npm) package for react native BUT can we use this with expo (when I tried to configure I could not find any JAVA files , in the project expo XDE created)
Thank you

Hey there, we don’t have react-native-webview-bridge in our core API. If you need to add a package with custom native code (java or objective-c) then you would need to detach to ExpoKit. Just from looking at this, I’m not totally confident it will do what you want without quite a bit of extra work. Why can’t you use the onMessage API built into React Native’s web view?

1 Like

@ben Thanks for the suggestion, May I have a link or some example code snippet of using onMessage API, if possible please… ?

Hi @naveendk - here is some documentation and a test case from React Native:

Here is where it is called within React Native (Android and iOS):

Hi @ide Thanks for the links !