0

Can I use existent javascript interface, currently attached to the WebView in my android and iOS projects, within React-Native app?

React-Native does not use WebView for itself to run. But I can create it React WebView. My question is about using existing javascript interface, perhabs attach it to the created in React-Native WebView, make some sort of React extension etc...

BACKGROUND:

I have several android and ios applications made using WebView. For WebView there is a javascript interface (same for all apps), that I use to access native device environment features (like Cordova/Phonegap) and third party SDKs and libraries (one o them is an SDK for Augmented Reality), so my javascript "bridge" handle all those API calls.

Every single app is made then within WebView environment (here I can use a variety of js libraries and frameworks like AngulerJS, JQuery etc...). My apps look like a transparent html body, camera image behind it with augmented reality 3d scene (3d models and 3d interfaces), other html views used for texts, images, lists, forms, popups, dialogs and so on.

This stack i quite solid and i made a lot of apps with it.

Then I found React-Native and i thought about realizing the "2D" part (that was always made in HTML) using native mobile components. So the question is: is it even possible to use my javascript "bridge" in React-Native context? I mean this "bridge" is attached to the WebView, what if I could transform it somehow to use with React-Native?

1 Answer 1

1

No, you can't. React Native does not use WebViews under the hood but normal iOS / Android UI Components.

Sign up to request clarification or add additional context in comments.

4 Comments

Yes, i know that React-Native doues not use WebView. But you can create it for example link. My question is about using existing javascript interface, perhabs attach it to the created in React-Native WebView, make some sort of React extension etc
I don't think that is a thing RN tries to do. AFAIK the WebView is only meant to be used to embed other websites and not create interactions with the RN app
It would be nice, if I could interact with a javascript inside of WebView from React App
You may add your wish to their product pains page: productpains.com/product/react-native

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.