1

I have a javascript library in my project. This library need external jquery libraries like this:

<script src="jquery.min.js"></script> 
<script src="jquery.signalR.js"></script> 
<script src="myLibrary.min.js"></script> 

Is there a way to use this library on my React Native project? Can I import jquery into my project? Thanks

2
  • Why do you need jQuery in a React application? Also, you can publish your library to NPM and import it through there. Commented May 31, 2019 at 7:12
  • I migrate from javascript to react native. myLibrary is a third party library Commented May 31, 2019 at 7:17

1 Answer 1

2

You can't use jQuery with react-native.

JQuery heavily relies on HTML DOM and CSS where react-native has their own DOM-like native view hierarchy with their own style implementation which is similar to subset of CSS (flex-box) but it is implemented differently.

Just to put it in perspective - React-Native app is NOT an HTML/Hybrid app - it's a native app with logic controlled by Javascript and using react patterns with virtual view hierarchy representation. The only common part with web apps is Javascript engine (no CSS/HTML). Phonegap apps are Hybrid HTML apps using web views so they can use frameworks/plugins that are not pure javascript but tied to HTML/CSS. source : stackoverflow

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

Comments

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.