Snippet for using Elm with React16

Continuing to gather small gists for newcomers, here is a self-contained Elm-in-React example that runs in Ellie. Although there is an integration NPM package for Elm in React this might still be useful for newcomers because you don’t need to install anything to toy around with it. Not using JSX is perhaps not that idiomatic but it keeps the snippet concise, I think. Any suggestions on improving it?

2 Likes

How is it different than https://blog.boon.gl/2017/11/28/react-elm-wrapper.html?

Ahh, thanks, I didn’t know that one. It’s pretty much exactly the same apart from the “not using JSX” :innocent: that’s just something that comes up once in a while and I find that having a simple Ellie link helps newcomers a lot since they don’t need to set up anything.

1 Like