Hacker News new | ask | show | jobs
by ch4s3 1345 days ago
From my brief experience of trying to move onto 0.19, it broke the few project I had running on elm and the path forward wasn't very straightforward. JS interop and dealing with json are both still tedious and awful. I really want to want to use elm, but I'm not sure I can justify putting in the time.
1 comments

JS interop via webcomponents is "the way" (vs ports). Re JSON decoding, agreed, and we cover in the episode: it's a solved/solvable problem that isn't popularized via a nice package...yet. But I think you've zero'd in on the pragmatic pain points; webcomponents is the revelation that was missing in the communication on the migration from 18 to 19, unfortunately.
I use web components as a workaround for elm being anti-component. It's infuriating. It makes me write JS instead of elm and obviously that causes lots of problems. The elm testing framework makes testing web components impossible too.

Elm has tons of low hanging fruit still. Evan just chooses to ignore them and look down his nose at any use case that doesn't work in elm currently.

This is probably the first I'm hearing of using webcomponents. I'd be interested to read about packages that help with JSON.
The guide has a whole section about web components/custom elements https://guide.elm-lang.org/interop/custom_elements.html. I've also found them useful in my code outside of Elm as they work in vanilla JS.