Controlled Component - React Js

 App.js:


import React, {useState} from "react";
import './App.css'

function App()
{
  const [val, setVal]=useState("");
return(
  <div>
    <h1>Controlled Component</h1>
    <input type="text" value={val} onChange={(e)=>setVal(e.target.value)}/>
    <h3>Text Value : {val}</h3>
  </div>
)
}
export default App;



Comments

Popular posts from this blog

Send Data Child to Parent Component - React Js

Hide , Show and Toggle in ReactJs

Importance Of Web Content In SEO.