import { useForm } from 'react-hook-form'; import { useCreateTodo } from './api'; export const NewTodo: React.VFC = () => { const mutation = useCreateTodo(); const { register, handleSubmit, reset, formState: { errors }, } = useForm<{ value: string; }>(); if (mutation.isLoading) { return