Also to expand on why I used an empty tuple - Elm, from my understanding,
will cache the call if it just returns a Bool, because it ends up looking
like a constant. I don't know if, as a result, Elm will actually execute
the function a second time, or if it will just return the boolean value
fr
I agree with Alex in all his points - ports are a better way to achieve
this. Btw () (0-tuple) is unit type
(https://en.wikipedia.org/wiki/Unit_type). *I'm saying that only so there
is any additional value in my comment other than +1 for Alex*
--
You received this message because you are subsc
Is there a good reason *not* to use a port for this? The difficultly level
is very low, and t's a single js function call.
Also, don't even consider a native module at all. The general consensus is
that native code isn't meant for the general Elm population, because it has
the ability to absolu
The only other way is to create a "native" module, which is an undocumented
and unstable API. Here's an example:
https://github.com/elm-lang/persistent-cache/blob/master/src/Native/LocalStorage.js
Ports are currently your best option.
On Friday, July 7, 2017 at 2:39:40 AM UTC-5, Casper Bollen w