Skip to content

Jugbot/vite-dynamic-form

Repository files navigation

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

Releases

No releases published

Packages

No packages published