Creating global browser runtime for shared access to runFork() Effects in PWA using Custom Elements
How can I create a single «global browser runtime» in a browser PWA (using Custom Elements + Lit), so that all custom elements can access it to
I’m currently using
Is there an idiomatic Effect-TS approach for this use case?
In code sample hereafter,
How to grab the browser runtime Effect?
runFork() Effects within the same root span and shared services (Datastore, ConfigManager, etc.)?I’m currently using
BrowserRuntime.runMain() for startup and its pretty logging, but after reading too much Effect docs and sources, I can’t figure out anymore how to simply access or share the «root Effect/runtime» instance for later runFork()!Is there an idiomatic Effect-TS approach for this use case?
In code sample hereafter,
console.debug(runtime) returns undefined.How to grab the browser runtime Effect?
