Jugbot / vite-dynamic-form

Created with StackBlitz ⚡️

Home Page:https://stackblitz.com/edit/vitejs-vite-gqcg3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vite-dynamic-form

A modularized and strongly-typed form implementation which is backwards-compatible with old data, running local migrations to ensure data integrity.

Edit on StackBlitz ⚡️

Important Files

Form Components:

  • Example Component -- simple component that clearly demonstrates basic form behavior
  • Parent Component -- more compplicated component that shows how to nest form components inside one another
  • Slot Component -- the most advanced component that dynamically hosts different children

Important Mentions

  • We determine global form state such as "Should the submit button be enabled" by defining a special key _type and recursively searching for errors in the form state tree. There are probably better ways to do this but premature optimization is the root of all evil

About

Created with StackBlitz ⚡️

https://stackblitz.com/edit/vitejs-vite-gqcg3d


Languages

Language:TypeScript 94.7%Language:CSS 4.4%Language:HTML 0.9%