Has anyone had some positive experiences with prototyping / rapid design iteration with Elm and can share some tips / encouragement?
Has anyone had some positive experiences with prototyping / rapid design iteration with Elm and can share some tips / encouragement?
I think two things are require for to solve this:
1. Some way to make it easy to drop in components into an existing view. Global state makes this hard, but it may be possible with some of Haskell's funky features, or even just type classes.
2. With the above we just need people to write some basic controls for Elm and give them more features. We need an ecosystem.
An example is a calendar control, in a grid control in a tab. You click right to go to the next month. That event needs to be bubbled through layers of boilerplate code to direct it back to the calendar's view.
Also another consequence is that the model is a mix of business data and UI state data. The selected month shouldn't affect the business logic, but it is bundled with THAT data which is annoying.
Not sure what the solutions are though.
I totally understand that DOM access is a pain point for Elm developers right now. I often run into that issue myself. But declaring a port is a small price to pay for the all that the Elm compiler gives you. When I have to refactor a React/Redux app, I absolutely dread it. With Elm, I love it, even if the project is older or unfamiliar.
If we have to use JS via ports (and it has to be asynchronous! dang) to achieve complex things anyway, why not use typescript, which can do absolutely everything you need without the language context and async switch?