Multiple LiveView. Share state across them via common socket

Hence your initial suggestion sounds like what I should be aiming at, a separate dedicated OTP process that would allow one to keep&share state from/to all LVs.

I think that’s the way to go.This way, not only can you share state across live views, but you can easily share it across your entire app.

Check out this thread: Channels - Where to store state? for some details on how you might go about it. Specifically, this post by @sasajuric describes a couple straightforward approaches.

1 Like