百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fielder

> 前端框架
开源

一个基于字段的表单库,适用于 React 和 React Native

190 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个基于字段的表单库,适用于 React 和 React Native

Fielder

A field-first form library for React and React Native.

About

Fielder is a form library for React and React Native that has been built from the ground up with a field-first approach to validation.

Features

⚡️ Synchronous validation - no cascading renders

Validation events - validation can differ per event (change, blur, submit, etc.)

Hooks that work - hooks respond to validation changes

Evolving schemas - validation logic evolves with the UI

Basic usage

Install Fielder

Add Fielder to your project.

bash
npm i fielder

Import the module

Use fielder or fielder/preact.

typescript
// React
import { useForm, ... } from 'fielder';

// Preact
import { useForm, ... } from 'fielder/preact';

Set up a form

Use the useForm hook to create a form.

typescript
const myForm = useForm();

return {children};

Create some fields

Use the useField hook to create a field.

typescript
const [usernameProps, usernameMeta] = useField({
  name: 'username',
  initialValue: '',
  validate: useCallback(({ value }) => {
    if (!value) {
      throw Error('Username is required!');
    }
  }, []),
});

return (
  <>
    
    {usernameMeta.error}
  
);

Additional info

Once you're all set up, be sure to check out the guides for a deeper dive!

Additional resources

For more info, tutorials and examples, visit the official docs site!

Also check out:

  • [Article] Why we need another form library
  • [Benchmark] Fielder vs Formik
  • [Video] Getting started with Fielder

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptformformshooksreact

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架