Reputation: 1527
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
Upvotes: 1
Views: 515
Reputation: 358
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
Upvotes: 2