get value of input element on button click react

Solutions on MaxInterview for get value of input element on button click react by the best coders in the world

showing results for - "get value of input element on button click react"
Federica
22 Jan 2018
1const input = props => {
2
3let textInput = React.createRef();
4
5function handleClick() {
6  console.log(textInput.current.value);
7}
8
9return (
10    <div>
11      <input ref={textInput} placeholder="Type a message..." />
12      <div onClick={handleClick} className="icon">
13        <i className="fa fa-play" />
14      </div>
15    </div>
16  )
17}
queries leading to this page
get data from input field to click on button react jsreact get value from input box on click of submithow to get input value on button click in reacttake input and display after button click in react functional componentget input value on button click reactwhen onclick submit button then get input field value in react jsreact onclick get input valueget input value in functaion component reactonclick value of input js reacthow to get input text value onclick in react jsgetting value of input onclick reacthow to get value from input field in react on button clickreactjs get input value on button clickvalue in input in react functional componenton button click get input value reactget input value on button click in reactread input value from text field on click of button in reactreact get input value on clickreact get value from input functional componentreact how to get all value from inputs from button click in other componentvalue of input in react functional componenthow to get input value on button click in react jsreact functional component button reference input valuereact functional component get textfield value on clickget value of input form onclick reactget form value on click reactif u want to change a button to text box in functional compoenentreact button onclick value of inputreact get input value on button click reactjsreact button onclick input valuereact text field with button onclick get valuecan you put a button inside input reactget value onclick reactget input value on onclick in reactjsreact click button get input valueon click get input value react class componenthow to get the value of button clicked in reactreact read input value on button clickreact js get input value on button clickon click button get input value reactreact get input value functional componentget value of input reactfunctional update when button click react jshow to get the current form value in a functional componentreact get input on button clickreact get input value on button click functional componentreactjs onclick get item valuehow to get the value of input field on button click in reactonclick input react js get the value 24get value from text field function componenthow to get input value with button reacthow to take a value from input field and print it at the click of a button in reactreact onclick get valuereact button onclick get value of textfielda input box which will give value when clicked on a button in react jshow to get an input value in react onclickreactjs onclick get input valuereact get input value on button clickreact button click get input valuereact functional component get input value react get input value after clicking buttonfunctional component how store input values with button click reactreact form submission with functional componentsfunction component getting value from an inputhow to get input field value on button click in react json click get input value reactreact set input value on button clickonclick get the value of an input react jsget value of input in react function componentget input value on click reactget input value on button click reactjs class componentreact component get input value click buttongetting value of input using a button in reactget input value onclick reactreact onclick get value from inputon click div fetch its value in react functional componentreact get form values on button clickreact get value from input on button clickreact on button click get input valuereact get value of input on button clickinput value react fucntionalhow to get the value of form on button click reactreact textfield with button onclick get valueretrieve values from input fields on button click reactget value of input element on button click react