3 ms·
Elm has its own infelicities with JS interop. Everything has to be done through ports, which means you have to contort your control flow to work with JS (which
by dwohnitmok 8y ago
Elm has its own infelicities with JS interop. Everything has to be done through ports, which means you have to contort your control flow to work with JS (which is extremely cumbersome if your JS is just pure functions).
For those not familiar with Elm it means you basically have to interact with all JS code through a pub-sub model and can't ever directly call JS code.
Elm's creator has his reasons for why he does this (https://guide.elm-lang.org/interop/ports.html https://guide.elm-lang.org/interop/ports.html), but it can make calling JS from Elm quite a pain.