我遇到了一个问题。我已在我的React项目中使用"jquery.counterup": "^2.1.0"
。但显示出一些错误。我在这种环境中是新手。我已经尝试过,但无法理解为什么显示这些错误?另外,当我尝试添加猫头鹰轮播时,也会显示类似的错误。
CounterUp NPM Source
import React, { Component } from "react";
import $ from "jquery";
import CountUp from "jquery.counterup";
class FunFactCOunter extends Component {
componentDidMount() {
Counter
$(".count").CountUp({
delay: 20,
time: 1500
});
}
render() {
return (
<React.Fragment>
<span className="count">500</span>K
<span className="count">450</span>K
</React.Fragment>
);
}
}
export default FunFactCOunter;
依赖项
"dependencies": {
"animate.css": "^3.7.0",
"bootstrap": "^4.1.3",
"jquery": "^2.1.4",
"jquery.counterup": "^2.1.0",
"popper.js": "^1.14.3",
"react": "^16.8.1",
"react-dom": "^16.8.1",
"react-icofont": "0.0.6",
"react-scripts": "2.1.3",
"waypoints": "^4.0.1"
},