Making a hook that encapsulates a form - TanStack