import { useState } from 'react' ; /**
 * Custom hook for partial state update.
 */ export function usePartialState < T > ( initialValue ) { const [ state , setState ] = useState < T > ( initialValue ) ; const setFormStateCallback = ( update ) => { setState ( { ... state , ... update , } ) ; } ; return [ state , setFormStateCallback ] ; }