Hacker News new | ask | show | jobs
by baobabKoodaa 1890 days ago
I recently worked with a large Elm codebase. The original authors had moved on long ago, and nobody in the current team understood the code or Elm. There were weird state bugs all over the place. Like, you would click on a thing, it would dispatch an API request and immediately render content with stale data, then re-render once the API response came back. If the API request errored, it would hide the error and display the incorrect, stale data. It was horrible. I spent a couple hours trying to figure out how state updates in the project work. Couldn't figure it out. Went back to doing the work I was actually paid to do, which was to hack new features/changes on top of the existing mess.
2 comments

The issues you mention sound like bad usages of Msg. I recommend asking questions on the Elm Slack to try and figure out what the problems are!
Or if you have more structured questions the Elm Discourse. The Elm Slack is very ephemeral and makes it hard to contribute to a single growing source of knowledge.
Sounds like the codebase would benefit from http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipatt... which is what we use all over the place in our production Elm app and I can't praise it enough.