Does React Javascript Support Jquery?
I'm trying to use jQuery in React Js but it shows that '$' is undefined. Is there some package I need to install or does React does not support jQuery.
Solution 1:
For your specific problem, try installing jQuery via npm.
npm i jquery --save
or
yarn add jquery
Then, in your modules...
import $ from 'jquery'
With that said, it's no easy thing to use jQuery and React together. React is unaware of changes made outside of the virtual DOM, and jQuery manipulates the standard DOM directly.
There's a write-up on how to approach this problem here.
Post a Comment for "Does React Javascript Support Jquery?"