Skip to content Skip to sidebar Skip to footer

How To Import External Javascript (which Requires Jquery) In Reactjs

First of all I'm still a newbie in web development. Okay, now to the question. I have these imports: import $ from 'jquery'; window.jQuery = $; window.$ = $; global.jQuery = $; im

Solution 1:

import * as jQuery from 'jquery';

Then you have a reference of jQuery and you may do with it what you like, for instance:

window.$ = jQuery;

Post a Comment for "How To Import External Javascript (which Requires Jquery) In Reactjs"