Best Practices for Memoizing Layers in Effect Typescript

Hello team,
What is the best way to memoize layers?

I have react hooks that take any effect and execute it.
Since an Effect could have arbitrary Requirements, what is the best way to handle that scenario?

I am thinking of providing layer to effect at edge, but that would recreate layer each time.

I could create one ManagedRuntime for app, but that would be too heavy, since few services are too heavy and preloading all isn’t great.

Any suggestions here ?
Was this page helpful?