3

Could anyone give some general guidance or point to an example of how to port a JavaScript library into a React Native component?

Specifically, I am interested in building a React Native component wrapper for AR.js, but I have no idea how to go about converting their system (which uses HTML<a-scene> elements) into something I could use as React Native markup.

1
  • Not very familiar with react native, I just use plain react... but the process for making components should be pretty much the same I imagine. If your 'scenes' are going to be pretty similar with only a few properties changing and such, it;d be pretty easy to make your component, but otherwise I'd recommend just going with a prebuilt binding for AR.js, like this Commented Aug 15, 2017 at 18:27

1 Answer 1

3

You cannot port AR.js into React-native without writing a binding
Learn more here Bridging in React-native

But still there is a dummy option: use WebView and feed with html files (test it by opening AR.js demo on Safari of iOS first)

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

2 Comments

I don't think we need a tl;dr for your answer
@Eden agree sir

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.