why do functional component in reactjs not have instances?
问题 In React quickstart, it is stated about Refs and Functional Components that You may not use the ref attribute on functional components because they don't have instances: function MyFunctionalComponent() { return <input />; } class Parent extends React.Component { render() { // This will *not* work! return ( <MyFunctionalComponent ref={(input) => { this.textInput = input; }} /> ); } } I don't fully understand the above statement and the example. So far from reading the tutorials, the only