I tried to use owl.carousel package in my react app. I installed jquery and owl.carousel package with npm.
npm install jquery owl.carousel
In App.js
import React from 'react';
import $ from 'jquery';
import 'owl.carousel';
componentDidMount() {
$('.team-slides').owlCarousel({
// my options
});
}
I got error message
TypeError: Cannot read property 'fn' of undefined.
/owl.carousel/dist/owl.carousel.js:1718
1715 | * @todo Navigation plugin `next` and `prev`
1716 | * @public
1717 | */
> 1718 | $.fn.owlCarousel = function(option) {
| ^ 1719 | var args = Array.prototype.slice.call(arguments, 1);
1720 |
1721 | return this.each(function() {
Please help me solve this issue.