I've tried to use Elm and The Elm Architecture on a project before, but I gave up.
The Elm Architecture makes it very easy to create small type safe components, but it forces parent components to manage the state + structure all children components. This makes it hard to use a component and to separate concerns.
In order to create a list of stateful children, you must:
1. Add a list of the child states to the component state, event if the parent component doesn't care about the child's state.
2. Handle adding + removing child state's manually
3. Map all scoped child state updates through your reducer, adding a constructor to your action type
4. Finally, map each of the child state's to the component's view.
You end up big types and match expressions that just manipulate lists. I have yet to see a FRP library that allows you to just use a component without introducing boilerplate.
The Elm Architecture makes it very easy to create small type safe components, but it forces parent components to manage the state + structure all children components. This makes it hard to use a component and to separate concerns.
In order to create a list of stateful children, you must:
1. Add a list of the child states to the component state, event if the parent component doesn't care about the child's state.
2. Handle adding + removing child state's manually
3. Map all scoped child state updates through your reducer, adding a constructor to your action type
4. Finally, map each of the child state's to the component's view.
You end up big types and match expressions that just manipulate lists. I have yet to see a FRP library that allows you to just use a component without introducing boilerplate.