Elm Native is public. You can build mobile apps now!

Hello folk,
It is my greatest pleasure to inform you that elm-native library is public now. This allows elm devs to build mobile applications using elm and Nativescript .
If you have any questions, post them in #elm-native-ui (we’ll use this old channel).

Repo: GitHub - hariroshan/elm-native-library: Elm native allows elm developers to build mobile application using NativeScript

Hari Roshan


Great work.

I asked before, but now you got to a release - did you miss having kernel code or effects modules at all in this project? Or was everything better without? Did you only use cutom elements or did you also need ports? Curious about this project especially as it seems quite a low-level replatforming for Elm.

1 Like

Hello Rupert,

Yeah, I have written custom HTML elements that create and manage the NativeScript objects. I had to think creatively to get data from elm to JS custom element. I didn’t use port at all! :smile: . @dillonkearns suggested using the Taskports library to access Nativescript API. I support Dialogs using Taskport. To be honest, I didn’t write any Task or Effects because we can always use elm ports. Since I had other problems to solve, I didn’t focus much on porting all the features of Nativescript`.

We’ll see how the developers handle this and then decide on the path we should take. The hardest one I had to solve is calling methods or assigning values to event object. Sometimes we had to call methods in event/gesture object to get values. A workaround I did is to wrap the elm event listener callback in custom element with my own callback.

This callback will decode and setup the event listener, execute method calls, and assign the values to the event object which can be decoded in elm using Json.Decode

My future plan is to build a sequence of actions like setter, assignment, getter, methodCalls, etc in elm, pass this sequence to the event listener, and have it execute them in sequence before calling the elm callback. I don’t want to complicate things with this sequence of actions approach for now.

Also, I don’t have any type restrictions in place. OK, maybe I have a few, but I tried to match Html modules and its API as much as possible. In fact, Html.Lazy package works with this library as well.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.