-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@lit-labs/forms package #8
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the RFC!
Here's some initial feedback about making the motivation and some of the API more clear to those not familiar with this area.
Thank you Christian! I added some info here and there in response to Justin's questions :) |
Thanks @UserGalileo for the answers. Thanks for the feedback @justinfagnani. |
no clue if this is still actively being pushed or anything but i almost started building a similar thing recently, so just a couple of thoughts... you have a builder doing stuff like this: this.fb.group({
user: this.fb.group({
name: this.fb.control(''),
surname: this.fb.control(''),
}),
consent: this.fb.control(false)
}) which you actually seem to use as an object schema, not anything to do with a form. i.e. you're defining the schema of the complex object your form will be updating. those if you were building up a "form", i'd expect those objects lead to you literally having some form groups and inputs automatically produced (into the DOM) but that doesn't seem to be what this is. which then leads me to wonder, aren't you verging on having just made your own JSON schema basically? lets say i had an object schema: {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"name": {"type": "string"},
"surname": {"type": "string"}
}
},
"consent": {"type": "boolean"}
}
} some function (the directive in this case) could quite easily traverse the object schema to figure out what setting totally unrelated to lit or DOM at this point, you'd have basically built a way to automatically bind event listeners and update a complex object correctly based on a schema. i guess my point is to be careful about inventing your own meta-schema, and to be clear that the form builder isn't building a form, its building some object mutation thing. also prior art to this - loads of json schema form generators out there in the wild. some defined their own meta-schema (itself a json schema) that can hold UI config (default values, validation, etc). some went with having two schemas (a JSON schema for the data, and a separate form schema for ui control stuff). |
Coming back to this after a while (sorry!) I'm trying to think of how we can frame the discussion and design in a way that's understandable for the team members who aren't familiar with such form libraries - so not assuming that the existing library shapes make sense to us :) I'd love to see this broken down into problems and goals before getting terribly deep into the details of a solution. For instance, I think that my understanding of these are: Problems:
Goals:
Broken down this way, this sounds a lot to me like a custom state management solution - akin to Redux, MobX, or maybe signals, but specifically for forms. This makes me wonder if the way forward forks into three possible paths: Possible solutions:
SignalsI would specifically like to call out and talk about the possibly of signals playing a role here. Signals are interesting because they are more atomic containers of observable state, and they may enable two-way binding without string-based paths as currently in the RFC. The example in the RFC: render() {
const { bind } = this.form;
return html`
<input type="text" ${bind('user.name')}>
<input type="text" ${bind('user.surname')}>
<input type="text" ${bind('consent')}>
`;
} Could possibly be re-written as: render() {
return html`
<input type="text" ${bind(this.form.user.name)}>
<input type="text" ${bind(this.form.user.surname)}>
<input type="text" ${bind(this.form.consent)}>
`;
} Where each leaf in the model is a signal with set and get APIs (Preact signals uses a BindingsIt seems like most solutions here would propose a higher-level binding mechanism. I think this part of the RFC is a good start on identifying what it needs to do:
but I think we need to flesh this out and include some examples (like how would one write a bind directive for MWC or Shoelace's input?). We might want to see if libraries would ship their own directives, since if users have to set this up its not much different from writing all the low-level bindings - it's only a win if they bind to the same type of component many times. |
Yeah basically what this would involve is 2 basic things:
Again, this would be a model-driven approach, with no progressive enhancement in sight imho. It's to decide if Progressive Enhancement would be worth it here, because to me (personal opinion) it's not, especially because with the new Form Associated Elements API it'll be the same story (if I'm not mistaken there won't be a declarative approach so no progressive enhancement a-la remix, too). So before even talking about this it's imho necessary to evaluate whether to go with a model-driven approach or a template-driven approach more towards standards [with its merits (eg. less code if you don't want to type the form, progressive enchancement) and downsides (eg. no nesting for progressive enhancement)]. For a template-driven approach, I think something like React Hook Form could be very cool (I don't really like the specific API, especially for complex forms and form arrays, but it's a detail). I'd personally be surprised to see Signals in user land here. It's another concept to add, which seems unnecessary for the developer to know if all it does is to avoid the string paths (which would be inferred correctly by TS anyway, so I see no practical difference). As for 3rd party components, I wouldn't expect library authors to ship anything: all the developer has to do to wire it is tell the directive:
In my POC it looked something like this, suppose we want to wire a const counterBindConfig = {
changeEvent: 'counterChange',
focusEvent: 'counterFocus',
blurEvent: 'counterBlur',
accessor: (el: Counter) => ({
getValue: () => el.value,
setValue: x => el.value = x,
setDisabled: is => el.disabled = is
})
} <my-counter ${bind('counter', counterBindConfig)}></my-counter> This is similar to what we do in Angular with custom form controls, too. |
I bring up signals because of the overlap in some of the problem/solution space. I really don't like the string-based API of Signals also apply to domains other than forms, so it might be fewer concepts to learn if someone's using signals elsewhere. The observable forms model looks so much like a state management system that I'm not sure it shouldn't just be based on an existing system rather than building a new one. Signals just happen to usually be one of the simpler and lightest weight options. |
Not sure if that is the right spot but there seems to be two kind of different needs?
I guess in many cases if there is a need for a "model" to manage forms then usually it also means you probably somehow what to display that form in the "models format as json"... e.g. for "smaller stuff" you can handle it "manually" as soon as you need a "complex" model you probably also want a "layout system" funny enough I am exactly in need of something like that so I have done some exploring but nothing really came up 😅 potentially something like My Use case is a list of documents and each document needs different data to be filled in. Would need to support
PS: throwing this in here - sorry if it doesn't fit correctly... it just came up at the same time 🤗 |
Disclaimer: I like signals! And I wouldn't be against them. My doubt comes from the fact that there isn't a single signal implementation that fits all (it's not a standard, or a community protocol or whatever iirc, for instance Observables seem more like a potential standard to me). Each system has its own caveats so there'll always be small (but noticeable) differences between one approach and the other. I like signals in frameworks (Angular, Vue, solid, preact) because they solve a major problem they all have: change detection (granular, in that case). Signals are the core for reactive templates. With Template Literals I'm not sure this is a big problem to solve? If Lit proposes something based on signals, one could ask then why not using them also for properties and states? Would signals play a role in other scenarios in Lit or would they be limited to forms? Just brainstorming! (I still fail to see how strings would be worse than references but that's secondary and I may be missing something :P) Anyway, I'm curious: how do you see the Progressive Enhancement matter? (Specifically, submitting the form without JS, taking into account the Form Association API) I think that's a very important discriminant. It seems you're talking about something like Formly for Angular? That's a different beast :P I'd love to have something like it too, but that'd be a second step! |
Hi I'll try to jump into conversation... IMHO, we are trying to solve as many issues as possible and cover the maximum possible use cases. What if we can start with something smaller? Let's solve one simple use-case for the registration form: username - string, required WTD? |
i've written several implementations of things like this over the years. the latest one does what justin mentioned via strings: html`
<form ${ctrl.attach()}>
<input type="text" ${ctrl.bind('email')}>
<input type="text" ${ctrl.bind('name.first')}>
<input type="text" ${ctrl.bind('name.last')}>
</form>
`;
// elsewhere...
ctrl.addValidator((model) => {
// do some validation
}); which results in this is a fairly basic approach and, i agree, would be made nicer if the strings were actual references. other approaches i've tried in the past:
i think @danduh is right too in that this is potentially a very large RFC. if we try solve both sides of it (form generation & form binding) in one, its a very deep rabbit hole and we might get stuck bikeshedding. i would say the basic form support would involve:
i'd expect to use the native separately, form generation could be tackled. i.e. something which generates the form DOM for you. |
As a design system author I am personally interested in remaining as close as possible to the native API. That means:
What I am missing from those APIs is:
Not sure if I need anything here:
Ideas that Lit could do:
|
Kind of a core question to this entire RFC: should lit provide an opinionated (non-declarative?) API for form integration (like Angular), or should lit provide low-level support and leave the rest up to users? Or both? Or start with low-level and see what happens? |
Discussed in our RFC review meeting. Implementing and maintaining our own forms model involves making many implementation choices, and will be an ongoing source of maintenance work. A small wrapper around an existing library will likely be an order of magnitude less code for us to maintain. One option for a library to wrap is final-form, which seems reasonably small and is published as modules; see this proof of concept by Augustine: lit/lit#2489 (comment). It does seem like there's been fairly light traffic on the final-form github the past few months though, maybe there's a better option? Would final-form match your use cases @Christian24? If so, we'd like to see this RFC updated to build on top of it, or another similar library. |
In terms of low-level support, there are at least a handful of separately usefully concerns:
I'm sure there are others, including support methods and examples for aria/accessibility concerns as well. If we kept them usable as separate modules and made it easy to use/mixin each in as needed/desired, that might be closer to our overall design philosophy for other packages and avoids creating a forms package that is overly "frameworky". |
Fyi, there is renewed development effort over in the tanstack family of libraries to get a framework agnostic form state management library off the ground. It's early days but considering the success around the other tanstack libraries, first and foremost tanstack query and table, I think it could be a reasonable alternative to final-form. They share a very similar api either way. Right now there is already a core package (final-form equivalent) and a react wrapper (react-final-form equivalent). See: https://github.com/TanStack/form |
First of all sorry everyone for being silent on the matter. I have changed projects and I now convert Cobol applications to Java... Therefore I lost track of what happened here. I thought the idea in general hadn't gained enough traction.
So, sorry, is there a regular schedule? Then I will try to make the next meeting.
From a brief look at it, it would cover my use case. What would be interesting is to make the wrapper work with the existing ecosystem. From what I understand form data is by default not typed, so this companion library would also need to be used.
I have not used Tanstack before, so I cannot really comment on it. I agree using an existing library is probably the way to go. To me one of the central questions is what would the Lit-API for custom controls look like? We would need some kind of wrapper to to allow usage of existing controls like Material Web Components for example. React Final Form solves it like this, not sure what our API would look like. |
Not the main point of your post but I thought I'll quickly leave this info here anyway as a side note. Final-form 4.14 introduced typed form values. This was exposed in react-final-form 6.1 via a |
My POC did take advantage of typed form values for final-form. Here it is copied over to stackblitz instead of the lit.dev playground as it shows type info on hover (though unfortunately lit templates don't get syntax highlighting): https://stackblitz.com/edit/vitejs-vite-vci6ei?file=src%2Findex.ts The control is mainly done by using a directive to add event listeners for focus, blur, and input events on the element, and updating value/checked properties on the element. Any custom form components should work if they follow closely to native elements. Here it is with material web components: https://stackblitz.com/edit/vitejs-vite-nhy8zg?file=src%2Findex.ts A more robust control might have an option to actually use HTML5 built in validation API like Tanstack form also looks potentially promising. I'll have to check it out and see what an adapter for that might look like. @Christian24 the RFC meetings have been ad-hoc but we try and announce them ahead of time on our discord server https://lit.dev/discord We'd certainly love to have you for our next one! |
I had a longer look at it and I see potential problems with using final-form:
I have seen Tanstack forms exploring FormGroups: TanStack/form#419 Maybe I should open an issue at Tanstack about Digging a bit, I also found this: https://github.com/final-form/final-form-calculate Which I found to be quite an interesting idea. Given this is quite a common use case. You change something in a form and other elements get cleared or calculated. Sadly, it doesn't look maintained.
We should allow customizing of all this behavior. I think people might have an existing control library, they don't want to change.
I agree. From what I see they wrap elements in their own controls. https://github.com/TanStack/form/blob/c6b246de9e47546716c41790330e7ee2d9d380ff/examples/react/simple/src/index.tsx#L41 It is a very different than just having a model or directive. Just feels different. I also need some time to play with it some more.
I'd love to come. To be honest the community lost me a bit due to work changes (I am no longer working with Lit) and I am not on Discord. Maybe it is time to change that. I have used neither library. So, maybe others can chime in about their experiences. Both seem not to be well documented. My feeling is at the moment both are lacking features. Maybe we need to let them develop a bit first? |
After some more research my view is that I had said that Maybe it makes sense to implement a reference form in Angular and then see how this could be adapted to lit with your prototype @augustjk? |
Some real-world or real-world-like reference would be nice to see as a goal of what kind of features we'd like to see though I don't know if it would really change the final form adapter much. It should be easy enough to add |
Hello @augustjk, I built a little reference form with arrays and groups: https://github.com/Christian24/forms-example The Stackblitz apparently has trouble with Angular Material. I will try to set that up tomorrow. There are also no validations etc. Just a general structure of a more complex form. |
Are the RFC meetings the Open Eng Meetings? I only ever see those when those have been going on for some time... |
Open Eng Meetings are weekly meetings where we discuss any engineering topics. Sometimes we get some discussion around an RFC but not always. We do a call for topics and we could totally fit form discussions there too. Otherwise the general RFC meetings have been ad-hoc. We've been focusing on 3.0 related work recently but after that we should look at scheduling another one of those. |
Hey @augustjk, I spent some time figuring out how to use arrays with final-form: https://stackblitz.com/edit/vitejs-vite-6o5g2z?file=src%2Findex.ts It actually works out of the box and the mutators are not needed. EDIT: I did update it now, so both reset and validations work again. One of the things I noticed is there seems to be no explicit grouping of fields. So you cannot easily do something like "give me an error-object just for this single item of this form array". You always have to query every field individually: getFieldState("employees[0].firstName")
getFieldState("employees[0].lastName")
getFieldState("employees[0].color")
getFieldState("employees[0]") // returns undefined If we really wanted something like this, we could probably query To make the ugly field paths a bit easier to work with, I just wrap Other finding: We should not give back Other observations: The TypeScript types that ship with final-form use I do feel we should allow some easy way of form nesting too. Maybe there could be a second |
Hi all! Sorry I missed this previously. I'm the maintainer of TanStack Form - wanted to drop in with thoughts and an offer to help.
Unfortunately, this is true at the moment. Notably, we have three major things we need to resolve first that y'all will likely run into:
However, a few thoughts:
Outside of stability (which we're moving quickly on) and form arrays (which we support but are not well documented) - what else would y'all be missing? How could we help? |
Hello @crutchcorn, Thanks for reaching out. I'd be very open to using TanStack Form. I will try to look at the work that has been done on your end tomorrow. |
Sounds good @Christian24 - I'm also in the Lit Discord, so please feel free to tag me in the server or reach out via DMs. I'd also be open to doing a voice call if you'd be interested at all, even if it's helping understand the problem-space or how to best utilize a non-TanStack library (IE: Final Form) |
@crutchcorn I'm glad you're in the community! I'd be interesting in joining a call too. |
If such a call happens, me too please! 🙏 It would be good to get this RFC moving more. I guess we could treat it similar to the wrapper work? i.e publish an integration or two with popular form libraries and leave the rest up to the consumer |
Also interested in call. 🙋 Agree with @43081j we should be open to having multiple integrations with forms libraries, whether they live in |
I'd also be interested to do a call. I am not active on Discord much (mostly browsing on my work laptop). Maybe we can find some time next week? @crutchcorn I took some time today and adapted @augustjk's prototype to use Tanstack Form: https://stackblitz.com/github/christian24/tanstack-form-lit-prototype?file=src%2Findex.ts There's currently no array support, but I am quite hopeful I can get that in soon. A couple of random feedback since I tinkered with the code today:
Tanstack Form seems like a great library and I am pretty certain a wrapper can be created in no time. |
@Christian24 , thank you immensely for the feedback. There are some known issues with docs and bugs as you mentioned - we're aiming to iron them out here soon. As for your implementation - while what you've outlined is a simplified, it's not quite aligned with the existing APIs of TanStack Form. Instead, I was prototyping in the Discord last night and came up with something akin to this - I'd love to hear your thoughts; Usageimport {LitElement, html} from 'lit';
import {customElement} from 'lit/decorators.js';
import {FormController} from './form-controller.js';
@customElement('my-form')
class MyForm extends LitElement {
private form = new FormController(this, {name: "Test"});
render() {
const form = this.form;
return html`
<form>
${form.Field(props => html`
<label>
<div>${props.name}</div>
<input/>
</label>
`)}
</form>
`;
}
} POC Implementationimport {ReactiveController, ReactiveControllerHost, LitElement, html, noChange} from 'lit';
import {customElement, property} from 'lit/decorators.js';
import {directive} from 'lit/directive.js';
import { AsyncDirective } from 'lit/async-directive.js';
function getField<T>(opts: T) {
class Field extends AsyncDirective {
templFn!: (props: T) => ReturnType<typeof html>
render(templFn: (props: T) => ReturnType<typeof html>) {
if (this.templFn !== templFn) {
this.templFn = templFn;
return this.templFn(opts)
}
return noChange;
}
// Used in the future to reproduce a component's lifecycle method
// Required by `@tanstack/form`
disconnected() {
console.log("DISCONNECTED");
}
}
return Field;
}
export class FormController<T> implements ReactiveController {
host: ReactiveControllerHost;
Field!: ReturnType<typeof directive<ReturnType<typeof getField<T>>>>
constructor(host: ReactiveControllerHost, opts: T) {
(this.host = host).addController(this);
this.Field = directive(getField<T>(opts));
}
// Used in the future by `@tanstack/form`
hostConnected() {
}
hostDisconnected() {
}
} |
Ignoring implementation for a moment, this is what the ideal API looks like IMO: /**
* This doesn't work today, just a demo
*/
import {LitElement, html, nothing} from 'lit';
import {customElement} from 'lit/decorators.js';
// This could also be `@lit-labs/forms` instead
import {FormController} from '@tanstack/lit-form';
import { zodValidator } from "@tanstack/zod-form-adapter";
import { z } from "zod";
@customElement('my-form')
class MyForm extends LitElement {
private form = new FormController(this, {
// Not only does this bind the default values, but it also handles the TS typings,
// `Field.name` will be forced to be a key of this object, and `onSubmit`'s `values` will be of this object's type
defaultValues: {
firstName: '',
lastName: '',
},
onSubmit: async (values) => {
console.log(values)
},
validator: zodValidator,
});
render() {
const form = this.form;
const onFormSubmit = (e: Event) => {
e.preventDefault();
e.stopPropagation();
void form.handleSubmit();
};
return html`
<form @submit="${onFormSubmit}">
${form.Field({
name: "firstName",
onChange: z
.string()
.min(3, "First name must be at least 3 characters"),
onChangeAsyncDebounceMs: 500,
onChangeAsync: async (value) => {
await new Promise((resolve) => setTimeout(resolve, 1000))
return (
value.includes('error') && 'No "error" allowed in first name'
)
},
render: field => {
const handleChange = (e: Event) => field.handleChange((e.target as HTMLInputElement).value);
return html`
<label .htmlFor="${field.name}">First Name:</label>
<input
.name="${field.name}"
.value="${field.state.value}"
@blur="${field.handleBlur}"
@input="${handleChange}"
/>
${field.errors.length ? html`<ul>
${field.errors.map((err) =>
html`<li>${err}</li>`
)}
</ul>` : nothing}
`
}
})}
</form>
`;
}
} |
Let me get the discord app, it seems like I have missed something ;) |
@augustjk, I saw you mention an interest in low-cost options in the linked discussion. If the ideal would be to rely on simple, effective solutions that already exist, are there any thoughts on trying out the Believe it or not, a lot can be accomplished with the native form APIs. You can even keep track of dirty/visited fields (including Web Components) with simple event listeners and To me, the ideal is to leverage the browser as much as possible, and I believe that this brings more flexibility than many people realize. This is part of the philosophy of the Right now, I'm on a mission to create integrations for all of the frameworks featured on Benefits of the Solid.js FormValidityObserver (non-exhaustive, similar in the Core and in all JS framework integrations)
If this seems like something that would be valuable, let me know. I'm actually really excited to create the CC: @Christian24 and @UserGalileo, as you both seemed quite invested in this discussion. |
Let me preface this by saying I do not speak for the team and absolutely do not want to discourage you.
The idea of a low-cost option is definitely true. Truth be told nobody really knows how adoption of a Lit form wrapper is going to develop. Could be a hit - could be dead on arrival. Since @crutchcorn has offered to help (regardless of the library used btw), there were talks about a Tanstack Form Lit adapter. I have pretty much a POC ready and we are trying to finalize the API. That said nothing is stopping you from creating your own adapter for FormValidityObserver. I welcome people taking part in this in whichever form it may be. I haven't looked at it in detail, but maybe you create the wrapper the community adopts. However, forms are hard. My two cents are that I would want to use an adapter by a team or library that has seen some adoption and maintenance. For example final-form works, but their TypeScript types and documentation are just incorrect and it looks like not much is happening on that front. Hence why I would vote for Tanstack Form, given @crutchcorn works daily on and with it and the Tanstack team has shown in the past they can and will maintain these packages.
While I generally agree with the idea of leveraging the browser as much as possible, I wouldn't agree in this specific case. We tried the browser validation API for our projects a while back and noticed that browser validation for emails was just checking if a string contains
|
I appreciate your honesty and thoughtful response! 😄 Some thoughts It's helpful to know that some work has already been put in place with the TanStack. I'll happily continue with the POC for the
Understandable! As the creator of the library, what's difficult about that is that a library doesn't have significant adoption until it has a significant adoption (even if it's good). But if I was on the consuming side, I would certainly want to know that what I was using was reliable. So I get the preference for TanStack. If it means anything, I do intend to continue maintaining the library with with proper functionality and TS types since I use it with my work. I've seen the concept work with a large, well-known company in the US (with an older implementation that was much more coarse); so I'm hopeful for the library's future. Maybe I'm naive, but after leaning into the browser a bit more, I'm actually not sure if forms are too too hard. At least in part, I think that after the birth of React, people got accustomed to using stateful forms very quickly. Currently, many JS frameworks have various kinds of solutions for stateful forms. But it's actually the stateful forms that I think have made forms so difficult. (I could be wrong.) Which leads me to...
Are there other significant examples of where you've found the browser to fall short when it comes to forms? You can easily access all of a form's data with Similarly, a I have indeed seen the insufficiencies of the Regarding the former, the browser still has very useful validators. Regarding the latter, a simple utility function is typically all that's needed for an entire web form to get accessible error messaging. (The These are all just thoughts/considerations that I'm adding to the discussion. I'm not expecting you to be suddenly swayed from the TanStack, especially given that you've already invested some time into it. |
Are you on Discord? I might be able to share with you in private what kind of forms we have been building.
If I read the docs for
I like the idea of using data attributes, however, these are string only also, right? I do not see how this is better than using a Additionally, I think your idea is implying that form controls that are no longer part of the DOM, are not relevant anymore either. I'd argue it depends on your use case if you want that or not. I would hope a form library would give me both options.
I agree the validation API is important, however, I am not sure how you support an array of controls with it?
We actually had issues with
Agreed, using builtin validations is best for accessibility.
I am open to whatever people bring to the table. So no worries. This is also very brief what I came up with from the top of my head at a hotel room desk. ;) Also I have been mostly on the application building end, I am sure @crutchcorn has much more experience than myself. |
What we're finding is that how to do forms is quite an opinionated space and users' needs vary widely. I think providing multiple options for users is great and would support having multiple form package integrations with Lit. With regards to the current state of this |
Indeed I do! I'll ping you. 😄
My understanding is that it's basically strings and blobs as well, yes.
I guess that isn't surprising. So the browser isn't great at complex pattern matching, huh? 😔 At least it has the simple things down.
This discussion is helpful! I think what's coming out is what I was looking for when I originally started building the I believe everything that's needed for forms is possible with that approach. But it does create some constraints that not everyone may prefer. Some examples:
What I like most about this approach is that I don't have to write anything complex in my markup, and I have something that works with or without a JS framework. So the HTML/JSX ends up much simpler, as does the API. But the tradeoff is that more thoughtfulness is required when it comes to how information is kept and how form data is sent to the server. (I give examples for these things in my docs so people aren't left in the dark.) And not everyone may want to be subjected to those tradeoffs.
🙇🏾♂️ |
@augustjk I'm discovering that as well. The discussion here has been very helpful/insightful for me. It's amazing how many ways forms can be done! When I start working on the |
@augustjk Opened Discussion lit/lit#4437 |
Well, for those who happen to straggle in and are interested, I did create an integration for Lit. Since Lit is a lot closer to pure JS than other frameworks with its Web Components approach, the API feels a lot like the core API -- just with slightly more convenience. Package: The goal of the
I hope this is useful. And I'm open to feedback in the GitHub Issues. Hopefully, as more options spawn, the form pain points in Lit will fade away. |
As promised I took a stab at a Lit adapter for Tanstack form: TanStack/form#577 If anyone has feedback, please let me know. |
Hello everyone,
this is a follow up from this discussion in the main repo. I know this is extremely vague and probably very far away from being implemented (if this ever gains traction), but it is the biggest pain point I have using web components at work and since @UserGalileo and myself have experimented with different solutions quite a bit (we actually use a similar in house solution in production), I thought I would compile it into the first RFC.
If someone has a completely different idea on how to handle this, please reach out, my goal is to improve the developer experience using forms, not promote this exact solution. :)
Cheers,
Christian