ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
TanStack Form: Simple Validation (with shadcn/ui & React)
ฝัง
- เผยแพร่เมื่อ 16 ส.ค. 2024
- Forms are not an easy business 🤯
Luckily there are many libraries helping out with that and today let me introduce you to the solution in the TanStack toolset.
Works on React, but also Angular, Vue, Solid, and Lit.
It’s Headless so you can use it with whatever UI components you have in your project and as with everything in TanStack it’s type-safe!
Worth mentioning it’s probably not production-ready yet, but if you’re curious it definitely deserves a try on side projects and feedback can help get to v1 soon 👀
Form Demo: github.com/Bal...
Dynamic Arrays: github.com/Dev...
_______________________________
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: github.com/Dev...
Join the Discord community! Here's the invite: / discord
You can also follow me on the other platforms:
Twitter: / balastrong
dev.to: dev.to/balastrong
GitHub: github.com/Bal...
Home: leonardomontin...
TikTok: / balastrong
Instagram: / devbalastrong
_______________________________
TIMESTAMPS
00:00 TanStack Form
00:31 Demo overview
00:54 Form setup
02:26 Fields setup
03:36 Handle submit and reset
04:15 Simple validation
05:42 Debounce
06:23 Multiple validations
07:24 Advanced validation
07:42 Arrays & nested fields
I think tanstack is future.It's really cool.
hello, i want to ask, i got some error said "Error: React functionality useState is not available in this environment." what should i do?
*already search for this error, but got nothing
or just because iam using next on it, thats why the error msg appear?
Using the library with React Server Components (in Nextjs for example) requires an extra configuration step. You can find more in the docs: tanstack.com/form/latest/docs/framework/react/guides/ssr