One issue with static impressions of an Elm app is knowing when to do it - when to consider the page has settled. The one point it can be done deterministically is right after the init
function; take the view
that results from that first Model
. Any other time could be non-deterministic since init
could return a Cmd.batch
and the order in which those hit the update
cannot be guaranteed. Consider starting a timer and issuing an HTTP request, which will complete first?
There are SSR techniques that work with Elm already, I am trying to think of things it cannot do, and whether the Elm compiler or runtime could support them better.
Would having some event you can listen too, in order to know when init
has completed (or even when update
or view
are being run) be something that needs to be added to the Elm runtime?