Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to quote jquery in React

Shulou Source: shulou.com Published: 2022-05-31 13:48:09 11月14日 Update

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.

Tags: Content objects articles more knowledge articles fun values elements most of them that is attributes consoles data methods styles steps interfaces knowledge points results Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Information Microsoft MySQL Apple