How to quote jquery in React
Most people do not understand the knowledge of this article "how to quote jquery in React", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to quote jquery in React" article.
It's more fun to reference Jquery in React, and get more data about elements.
1. Examples of introducing methods:
Import $from 'jquery';import {Button} from' antd';class testJquery extends React.Component {constructor (props) {super (props); this.selectElement = this.selectElement.bind (this);} render () {return (click this is: 12) } selectElement () {console.log ('text object:', $('.text')); console.log (values in 'text:', $('.text') [0] .textContent);}} export default testJquery
two。 Interface style
3. Console print results
Partial properties of 4.text object
The above is about the content of this article on "how to quote jquery in React". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.