In this lesson, we look at where we came from with refs in React. Starting with the deprecated string ref pattern, callback refs, and then how to use the new createRef() method in React 16.3. Additional Resources: refs and the dom You can use 'React.…
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './First.css'; import $ from 'jquery'; class First extends Component { constructor(props) { super(props); // create a ref to store the textInput DOM element //每个事件必须…