For a canvas-based app, which to be fair none of my professional work has been, you’d need to write some JS or hooks to interface with external JS libraries.
Can you give me an example of when you would need a LiveView app to spawn a thread or set up an observer via JS?
Spawning a thread sounds particularly odd given that JS isn’t running on the server. Are you speaking of web workers? Or do you mean doing something from JS code to send a message to the Phoenix server to get it to spawn a process (i.e., a green thread) on the server?
Yeah, I meant web workers. It's easy to find canvas and web workers in any sufficiently complex highly interactive web app. I'm not saying you always find them, but if you're doing some form of graphics you most probably use canvas at some point, if you do non-trivial computation you spawn workers, if you need sound you use the Web Audio API, if you have a complex layout you're better off with DOM Observers, and so on...