Code Solution

thi is me th syir wb site rith now thodign

home

How to get input field value in React JS functional component

How to add existing folder to GitHub repository

How to get the value of the input field in react js? If we want to get the value of input in react js, then for that we have to The state should be known so that we can get the input field in react js. If you have written javascript, html In react js the value is stored in variables but if you want to get the value of react js input field then you have to know the state only then you can get the value in react js.

how to get input field value in react js functional component

input in react js functional components value of filed how to get In react js, if you want to get the value of input, then the usestate should be known so that you can easily get the value in the input field.

react get value of input on button click

  • How to get the value of input field on button click in react js and where to store it? Let us see how to get the value of input with a functional component in react js.
  • how to get value onclick in react

    
     import React, { useState } from 'react'
    
    function page() {
    
        const [input, setinput] = useState();
    
        console.log(input)
    
      return (
        <div>
    
    <h1>how to get value onchange in react</h1>
       <input className=' bg-slate-100 my-5 relative left-[44vw]' type="text" onChange={(e)=>setinput(e.target.value)} />
    
        </div>
      )
    }
    
    export default page
        

    How to add existing folder to GitHub repository