A technique I’m using is to notify a port when all the necessary effects have been processed by update. Once the JS (running JSDOM in my case) receives that, it needs to know when the next view
function has completed. Unfortunately there is no callback for that, so I set up a mutation observer and assume that the next mutation is the VirtualDOM done.
This works OK without too much manual work (basically a single out port), but feels a bit brittle. A callback after view rendering would be much nicer.