import React , { useState } from "react" ; const useField = ( label , initialValue ) => { const [ value , setValue ] = useState < typeof initialValue > ( initialValue ) ; const onChange = ( event ) => { setValue ( event . target . value ) ; } ; return { label , value , onChange } ; } ; export { useField } ;