I used vue for a project and encountered a gnarly bug - I have a component which can embed itself recursively, and I pass some variables through the stack to communicate to the root. But if I nest 3 components deep, it actually hangs the tab and crashes chrome! Can’t even debug! Not sure how to even recreate it in a way that’s not proprietary and hence can’t file a bug as well.
FormKit: Form building framework for Vue 3
11–20 of 69 posts
Re: FormKit: Form building framework for Vue 3
#12Re: FormKit: Form building framework for Vue 3
#13Earlier quoted context omitted.
Why can’t you debug?
Because it doesn’t throw an error, and it hands deep inside the vue code when an even to add one more nested component is triggered.
Re: FormKit: Form building framework for Vue 3
#14Re: FormKit: Form building framework for Vue 3
#15Re: FormKit: Form building framework for Vue 3
#16Re: FormKit: Form building framework for Vue 3
#17Why people keep inventing new schema formats? JSON Schema is not perfect but you can extend it to achieve all of what's in this schema format.
They definitely are using their DSL for things far out of the scope of JSON schema. The builtin debouncing is pretty neat: https://formkit.com/essentials/validation#debounce-milli
Forms in UI code also tend to have a bunch of business-logic type validation (e.g. "there's already a user with that email address") which schemas alone are unsuitable for.
Re: FormKit: Form building framework for Vue 3
#18I feel like the next evolution is automatically generating a whole form from selecting a schema in an OpenAPI spec.
In a lot of specs, the type (string, email, phone, int, etc) is present along with any constraints (min/max length). Depending on the language/OpenAPI generator, it even preserves field order. It could massively speed up a lot of the more generic forms that happen in frontend.
Re: FormKit: Form building framework for Vue 3
#19I used vue for a project and encountered a gnarly bug - I have a component which can embed itself recursively, and I pass some variables through the stack to communicate to the root. But if I nest 3 components deep, it actually hangs the tab and crashes chrome! Can’t even debug! Not sure how to even recreate it in a way that’s not proprietary and hence can’t file a bug as well.
The only issue I encountered is that recursive components must be named since they can't import themselves. This is covered in the official Vue docs [3]
[1] https://github.com/AlbinoDrought/vue-dit/blob/master/src/com...
[2] https://albinodrought.github.io/vue-dit/#/sub/technology/uom...
[3] https://v2.vuejs.org/v2/guide/components-edge-cases.html#Rec...
Re: FormKit: Form building framework for Vue 3
#20I used vue for a project and encountered a gnarly bug - I have a component which can embed itself recursively, and I pass some variables through the stack to communicate to the root. But if I nest 3 components deep, it actually hangs the tab and crashes chrome! Can’t even debug! Not sure how to even recreate it in a way that’s not proprietary and hence can’t file a bug as well.
I'd be interested in seeing your code for this. I'm 99% certain it's something in your code rather than in Vue itself. I've done recursive nesting myself plenty of times and as long as you limit the depth so it doesn't go infinite you're fine.