I am not able to edit in the text field its shows only the default value ,how to initially its show the default values and the I have to edit the text field as my requirement
const[vari,setVari]=React.useState("SAM");
return (
<div>
<input value={vari} onchange={(e)=>setVari(e.target.value)}/>
</div>
It is probably due to the fact that you are spelling the event listener in the HTML way instead of the React way. Try onChange instead of onchange.
You need 'onChange' not 'onchange': https://stackblitz.com/edit/react-ehulbm