1

I want to integrate a bootstrap layout into ReactJS. Here I have face one issue as I missed a jquery file from bootstrap so that my code is not working. I am very confuse how to integate Jquery in App.js

import './App.css';
import './css/bootstrap.min.css';
import './css/style.css'; 
import './css/slick.css';    
import './js/slick.min.js';   //Jquery   

Error shows as :

Line 17:     'define' is not defined no-undef
Line 17:     'define' is not defined no-undef
Line 17:    'jQuery' is not defined no-undef
Line 17:     Expected an assignment or function call and instead saw an 
             expression  no-unused-expressions
Line 17:     Expected an assignment or function call and instead saw an 
             expression  no-unused-expressions 

How can i add slick.min.js in App.js

sixthstar
  • 75
  • 1
  • 1
  • 9

1 Answers1

0

Referred from: https://stackoverflow.com/a/33351325/11932228

First try to include jquery into your project

just use npm to install the jquery package: npm i jquery --save

or if you use yarn: yarn add jquery

or if you use bower: bower i jquery --save

and in your App.js : import $ from 'jquery';

if it still doesn't work you might need to check the requirements of the layout it might not be compatible with react.

Jacob
  • 31
  • 3