MCPcopy Create free account
hub / github.com/Klerith/react-hooks / onInputChange

Function onInputChange

src/02-useEffect/SimpleForm.jsx:14–20  ·  view source on GitHub ↗
({ target })

Source from the content-addressed store, hash-verified

12 const { username, email } = formState;
13
14 const onInputChange = ({ target }) => {
15 const { name, value } = target;
16 setFormState({
17 ...formState,
18 [ name ]: value
19 });
20 }
21
22
23 useEffect( () => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected