form
๐ค Headless, performant, and type-safe form state management for TS/JS, React, Vue, Angular, Solid, and Lit. (by TanStack)
typescript-runtime-type-benchmarks
๐ Benchmark Comparison of Packages with Runtime Validation and TypeScript Support (by moltar)
form | typescript-runtime-type-benchmarks | |
---|---|---|
7 | 37 | |
5,732 | 776 | |
1.4% | 0.6% | |
9.7 | 10.0 | |
7 days ago | 5 days ago | |
TypeScript | TypeScript | |
MIT License | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
form
Posts with mentions or reviews of form.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-02-21.
-
JavaScript schema library from the Future ๐งฌ
Also, ReScript Schema supports Standard Schema, a common interface for TypeScript validation libraries. It was recently designed by the creators of Zod, Valibot, and ArkType and has already been integrated into many popular libraries. This means that you can use ReScript Schema with tRPC, TanStack Form, TanStack Router, Hono, and 19+ more at the time of writing the article.
-
React libraries for building forms and surveys
Tanstack Form: A lightweight form management library built by the TanStack team. Furthermore, it supports numerous other libraries like Vue, Angular, Lit, and more
-
Reusable form inputs with React Hook Form and TypeScript
When it came time to introduce a form validation framework to my previous company's app, we actually settled on TanStack Form. We took one swing at it, and immediately felt that the syntax was not for us. Sorry Tanner.
-
TanStack Form Tutorial: Advanced Validation
Spoiler: soon it will be possible to validate fields in the form validator too! See: https://github.com/TanStack/form/pull/656
-
TanStack Form: Setup and simple validation (with shadcn/ui)
If you want to support the development of the project you can contribute to the GitHub Repo as I'm doing. You'll also find some previews such as this PR which will extend the validation feature.
-
Nx - Highlights of 2023
Tanstack - Tanstack has evolved to an entire ecosystem consisting of the famous Tanstack (or React) Query, Tanstack Table, now also Tanstack Router and Tanstack Form. It started with Tanstack Query, which adopted Nx and Nx Cloud. Zack talked about this collab with Dominik, and we also had Dominik on our Nx live stream. Now, all the above-mentioned Tanstack libs have adopted Nx, and there's more coming.
-
The Best React Form Library (2022)
Iโve tried lots of form libraries, but none solve the burden of easy, rapid form building as well as RJSF does.
typescript-runtime-type-benchmarks
Posts with mentions or reviews of typescript-runtime-type-benchmarks.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-02-21.
-
JavaScript schema library from the Future ๐งฌ
Yes. It's ~100 times faster than Zod and on par with Typia or Arktype (benchmark). But often, besides validation, you want to transform data incoming to your system, and here, ReScript Schema overperforms any solution existing in the JavaScript ecosystem.
-
Zod: TypeScript-first schema validation with static type inference
Something cool that I can't remember if it was posted on HN at one point or I stumbled across when looking for alternatives to yup but this repo has been compiling a bunch of different benchmarks for runtime validation of ts validation libraries. Obviously to some degree the performance is arbitrary when you're reaching millions of operations per second but on the flipside their benchmarks are against rather data. Would be interested to see comparison of either more nested data or otherwise complex. Maybe something to look at in my spare time.
https://moltar.github.io/typescript-runtime-type-benchmarks/
-
Show HN: Modern Benchmarking Tooling for JavaScript
Any plans for web compatible output?
I maintain this repo, and we hand roll the stats page, but if we could get that for free itโd be so great!
https://github.com/moltar/typescript-runtime-type-benchmarks
- What can TypeScript learn from Zig? What can Zig learn from TypeScript?
-
TypeScript please give us types
Has been heavily optimized, both in terms of its types and runtime performance. Even including the static parser, many types are about an order of magnitude more efficient than equivalent Zod. Early results show it as marginally faster than any validator currently published to typescript-runtime-type-benchmarks, not including more complex cases where (2) would give ArkType a much more significant advantage.
-
What are some of the best libraries you cannot work without?
Zod is a bit of an underdog but it is not fast, AJV which is slightly more common can validate and generate types too but requires using JSON syntax, TypeBox offers familiar syntax to Zod while still being JSON syntax in the background.
-
[AskTS] What do you think will be the future of runtime type checking?
First, they're not fast (runtime type checking benchmarks).
-
Typescript really hits the middle ground between extremely rigid statically typed languages on one extreme and no types at all dynamic languages on another extreme. Best type system
Aha, so you're using a library in Java for this. You know about libraries in TS for this, there are plenty of them btw, but you don't use them because it's so easy. Express has `any` type for `req.body` because authors don't care about this either and it's so easy. And TypeScript is the one to blame in that you prefer to work with `any` type for incoming data rather than validating it.
-
TypeBox: Runtime Type System Built on Industry Standards
It is so much faster than Zod that Zod basically doesn't show, https://moltar.github.io/typescript-runtime-type-benchmarks/ and according to bundlejs, https://bundlejs.com/?q=zod%2Czod%2C%40sinclair%2Ftypebox&treeshake=%5B*%5D%2C%5B%7B+default+%7D%5D%2C%5B*%5D&config=%7B%22analysis%22%3Atrue%7D, it is even smaller. I genuinely have no clue why Zod is this popular in 2023.
- Whatโs your favourite validation library?
What are some alternatives?
When comparing form and typescript-runtime-type-benchmarks you can also consider the following projects:
use-metamask - a custom React Hook to manage Metamask in Ethereum ฤApp projects
arktype - TypeScript's 1:1 validator, optimized from editor to runtime
react-hook-form - ๐ React Hooks for form state management and validation (Web + React Native)
ts-auto-guard - Generate type guard functions from TypeScript interfaces
react-cool-form - ๐ ๐ React hooks for forms state and validation, less code more performant.
zod - TypeScript-first schema validation with static type inference