NA +91-8727899942 thecoderjob@gmail.com

CHAPTER - 13

Input box experiment

  • Example :

function App() {

const [inputData,setInputData]=useState(false)

  function updateData(e){

    setInputData(e.target.value)

  }

  return (

    <>

     { inputData?

       <h1> {inputData}</h1>

       :null }

    <input type="text" onChange={updateData} />

    </>

  );

}

 

Chapter 12

What is props

Previous chapter

Chapter 14

Show & Hide experiment

Next chapter

Get In Touch

NA

thecoderjob@gmail.com

+91-8727899942

Popular Links

© www.thecoderjob.com. All Rights Reserved.               Designed by HTML Codex