/
lizardking
/
react_project
Обзор
Документация
Войти
/
lizardking
/
react_project
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/features/react19/FormWithAsyncSave/ui/FormWithAsyncSave.tsx
23 строки
732 B
LizardKing
Task 9 - React 19
14 ноя 2025, 20:35
14 ноя 2025, 20:35
86e4531
Код
Авторство
О чём код?
import { Input } from 'shared/ui/Input' import { PrimaryButton } from 'shared/ui/PrimaryButton' import { useFormWithAsyncSave } from '../model/useFormWithAsyncSave' export function FormWithAsyncSave() { const { formState, isPending, buttonLabel, formAction } = useFormWithAsyncSave() return ( <form action={formAction} className="flex flex-col gap-3"> <Input id="value" title="Значение" name="value" placeholder="Введите что-нибудь" error={formState.errorMessage} errorMessage={formState.errorMessage} /> <PrimaryButton type="submit" disabled={isPending}> {buttonLabel} </PrimaryButton> </form> ) }