How to introduce plug-ins in react: first add [(function(answerSheet){)] at the beginning of the js library; then add [})($); module.exports = $;] at the end of the js library That’s it.
The environment of this article: windows10, react16, Dell G3 computer, this article applies to all brands of computers.
(Recommended tutorial:react video tutorial)
Use the module method to introduce a js plug-in:
First add # at the beginning of the js library ##
const $ = require('jquery'); (function(answerSheet){)
const $ = require('jquery')
})($); module.exports = $;
import answerSheet from './answersheet.js';
The above is the detailed content of How to introduce plug-ins in react. For more information, please follow other related articles on the PHP Chinese website!