form/Form.tsx

zent · packages/zent/src/form/Form.tsx · typescript · MIT
ui

Complete React form component with validation, layout, and state management.

// Source: https://github.com/youzan/zent | License: MIT | Copyright 2016-present Youzan
// Provided via justclaw.it.com; keep this notice with the code.
import cx from 'classnames';
import { Subscription } from 'rxjs';
import { Component, createRef } from 'react';

import {
  FormProvider,
  useField,
  useFieldArray,
  useFieldSet,
  field,
  set,
  array,
  form,
  FieldValue,
  FieldSetValue,
  useFieldArrayChildModels,
  ValidateOption,
  createAsyncValidator,
  isAsyncValidator,
  useFieldValue,
  FieldValid,
  useFieldValid,
  // eslint-disable-next-line import/no-deprecated
  useModelValid,
  // eslint-disable-next-line import/no-deprecated
  useModelValue,
  useNamedChildModel,
} from './formulr';
import memorize from '../utils/memorize-one';
import {
  FormChildrenContext,
  IFor

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key