You should avoid ref="googleInput"how it is now considered obsolete. You should declare instead
ref={(googleInput) => { this.googleInput = googleInput }}
Inside your handler, you can use this.googleInputto reference an element.
Then inside the function submitFormyou can get the text value withthis.googleInput._getText()
String links are deprecated https://facebook.imtqy.com/react/docs/refs-and-the-dom.html.
React , , , API, ref , "textInput", DOM this.refs.textInput. , , , , . this.refs.textInput , .
React 16.3, :
class Component extends React.Component
{
constructor()
{
this.googleInput = React.createRef();
}
render()
{
return
(
<div ref={this.googleInput}>
{/* Details */}
</div>
);
}
}