UNPKG

@ehfuse/forma

Version:

Advanced React state management library with individual field subscriptions - supports both forms and general state management with useFormaState

50 lines 2.69 kB
/** * useForm.ts * * Forma - 고급 폼 상태 관리 훅 / Advanced form state management hook * 개별 필드 구독과 성능 최적화를 제공하는 핵심 훅 * Core hook providing individual field subscriptions and performance optimization * * @license MIT License * @copyright 2025 KIM YOUNG JIN (Kim Young Jin) * @author KIM YOUNG JIN (ehfuse@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import { UseFormProps, UseFormPropsOptional, UseFormReturn } from "../types/form"; /** * Forma 핵심 폼 관리 훅 / Forma core form management hook * * 고급 폼 상태 관리와 성능 최적화를 제공합니다 * Provides advanced form state management and performance optimization * * Features: * - 개별 필드 구독으로 선택적 리렌더링 / Selective re-rendering with individual field subscriptions * - Dot notation 지원으로 중첩 객체 처리 / Nested object handling with dot notation support * - MUI 컴포넌트 완전 호환 / Full MUI component compatibility * - TypeScript 완전 지원 / Complete TypeScript support * * @template T 폼 데이터의 타입 / Form data type * @param props 폼 설정 옵션 / Form configuration options * @returns 폼 관리 API 객체 / Form management API object */ export declare function useForm<T extends Record<string, any> = Record<string, any>>(): UseFormReturn<T>; export declare function useForm<T extends Record<string, any> = Record<string, any>>(props?: UseFormPropsOptional<T>): UseFormReturn<T>; export declare function useForm<T extends Record<string, any>>(props: UseFormProps<T>): UseFormReturn<T>; //# sourceMappingURL=useForm.d.ts.map