()
| 2 | |
| 3 | |
| 4 | function App() { |
| 5 | |
| 6 | const [name,setName] = useState(''); |
| 7 | const [age,setAge] = useState(''); |
| 8 | const [password,setPassword] = useState(''); |
| 9 | |
| 10 | function handleSubmit(e){ |
| 11 | e.preventDefault(); |
| 12 | console.log(name); |
| 13 | console.log(age); |
| 14 | console.log(password); |
| 15 | } |
| 16 | |
| 17 | console.log("Render"); |
| 18 | |
| 19 | return( |
| 20 | <> |
| 21 | <form onSubmit={handleSubmit}> |
| 22 | <div> |
| 23 | <input type='text' value={name} onChange={(e)=>setName(e.target.value)}></input> |
| 24 | </div> |
| 25 | <div> |
| 26 | <input type='number' value={age} min={10} max={80} onChange={(e)=>setAge(e.target.value)}></input> |
| 27 | </div> |
| 28 | <div> |
| 29 | <input type='password' value={password} onChange={(e)=>setPassword(e.target.value)}></input> |
| 30 | </div> |
| 31 | <button>Submit</button> |
| 32 | </form> |
| 33 | </> |
| 34 | ) |
| 35 | } |
| 36 | |
| 37 | export default App; |
nothing calls this directly
no outgoing calls
no test coverage detected