Looking for a Simple Vanilla ES6 JSON to Form Generator

0
15
Asked By TechieTomato99 On

Hey everyone! It feels like with all the UI frameworks out there, nobody's really building vanilla ES6 tools anymore. I have an application with a massive configuration object that needs a form, and I'm not keen on adding a framework just for this small task due to performance and maintenance issues. I've searched high and low on GitHub, but it feels like finding a needle in a haystack! If anyone has any recommendations for a good vanilla ES6 library that can generate forms from JSON, I'd really appreciate your help. Thanks a bunch!

5 Answers

Answered By CuriousCat23 On

Right? The whole "needle in a haystack overflow" is real! It feels like everyone just opts to `npm install -form-generator` these days. Keep searching; I hope you find that perfect solution!

Answered By CraftyCoder42 On

I totally relate to your struggle! A few years back, I searched for something similar to generate forms from large config objects and didn't have much luck. I really looked for features like extensibility for complex validations, active maintainers, and good documentation. Unfortunately, I never found anything worthwhile. Nowadays, I just use Angular's reactive forms—they're quite nice but I know that's not what you're looking for.

Answered By CodeWhisperer8 On

I actually created a library for this purpose that works with JSON schema! It's called Jedison and even though it doesn't have many stars yet, it's been used in production for government projects at my company. It has plenty of unit and end-to-end tests too. Check it out on GitHub!

HappyDev2000 -

Oh man, this looks awesome! I just starred your repo; it’s exactly what I’ve been looking for!

UserLovesColors -

Nice, I love that it includes a color picker! Great work!

Answered By StraightTalker76 On

Honestly, this is why UI frameworks became so popular. You pretty much need to create a UI input element for every JSON object in your configuration. If you look at the vanilla code generated by JSX parsers, it's just a series of `document.createElement()` calls. JSX just simplifies that process!

Answered By PragmaticDev101 On

Why complicate things with a library? You can just use `forEach` along with `createElement`. It could be as simple as a switch-case for each type of input you need.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.