安装
npm install jquery --save
引入
import React, { Component } from 'react'
import $ from 'jquery'
export default class Test extends Component {
componentDidMount(){
console.log('$(".test").text()',$(".test").text())
}
render() {
return (
<div className="test">
jQuery
</div>
)
}
}
原文地址:https://www.cnblogs.com/shunk/p/10695402.html
时间: 2024-10-08 06:39:43