Recommendations for Easing Elm into a Project

Hello everyone.

New here and excited to be diving into learning Elm. I am really liking it so far and basically just have done same basic tutorials, read a book and my doc reading and all that good stuff and ready to try implementing it more into some of my projects. Everything from the creator of Elm says easing it into existing projects is the way to go (at least for people like me it seems) so I just wanted to see if anyone had some general recommendations or experiences to share with trying to go about doing this.

I am kind of being purposefully vague here just because that is kind of where I am at right now. I have some basic projects - be it React, Vue or vanilla - but just wanted to throw this out and see what I could get before diving in and maybe going the wrong way – Although often times that is a good learned experience in its own right.

React and Vue apps seem pretty seamless with their component based natures so should I be looking there and maybe targeting components with very little state? Or should I try to go at something with a good amount of state and stumble around for a bit? Any experiences there?

Again sorry if it is too vague and hard to answer but I think that is kind of what I am going for - just curious to see any responses or any general advice you guys might have for me.

Thank you everyone!

3 Likes

You’ll be getting lots of different opinions on this (I think) - I’ll give you mine fwiw. :sweat_smile:

I think creating a “component” with Elm with some state will be quite interesting to start using it since then you will be able to use the elm architecture and play with data modeling - the nice stuff.

If there is no state at all you will just deal with views which are fine but you won’t touch what really makes Elm special imo!

If you wanna delay something for an easier learning path I’d delay http requests and complex data types interop - since then you will need to understand more about cmds/tasks/decoder. It is all pretty simple but people seem to get stuck there more often.

Btw - I’m pretty sure you will be able to create a component in React/Vue that will wrap an Elm app so this might good if you already have applications using those.

1 Like

Thank you sir! That is exactly what I was looking for. I think that makes sense on holding off on http req for now…I just want to start writing some code and getting into those good habits. I think I will start and just take a look at a Vue or React project and ID a good component to try out. The decoders are probably the most foreign aspect of those you mentioned right now so keeping data as simple as possible might be best. Just writing this stuff out and thinking about it more helps too.

Thanks again, I appreciate your response!

1 Like

For mixing Elm and Vue you might find GitHub - lindsaykwardell/elm-vue-bridge: Bridge to render Elm modules in a Vue application useful. There are similar packages for React as well but I know Lindsay has been writing a lot recently about Elm and Vue.

Oh that is perfect. I actually found a little more on React than Vue just with simple searches etc…, but I happen to enjoy writing Vue more than React so this is more up my alley. Plus its just always nice to know others are out there making these things easier for us all.

Thanks again!