Jquery in React is not defined

后端 未结 5 1941
梦如初夏
梦如初夏 2020-11-27 04:35

Hi I just want to receive ajax request, but the problem is that jquery is not defined in React. React version is 14.0

Error message

 U         


        
5条回答
  •  时光说笑
    2020-11-27 05:16

    Isn't easier than doing like :

    1- Install jquery in your project:

    yarn add jquery
    

    2- Import jquery and start playing with DOM:

    import $ from 'jquery';
    

提交回复
热议问题