Support more than one shared page #3265
Replies: 3 comments 8 replies
-
Hi @bin-san, It is currently not officially supported to have more than one shared page. But in principle it should be possible to create a shared client like this (which somehow doesn't work...): with Client(ui.page('/shared'), shared=True):
ui.label(f'Shared ID: {uuid.uuid4()}') I'll convert this discussion into a feature request. So maybe we can add support for multiple shared pages in the future. |
Beta Was this translation helpful? Give feedback.
-
You can make the page act like shared by storing the relevant page state in a shared variable. |
Beta Was this translation helpful? Give feedback.
-
If I'm understanding the discussion correctly, something like this would be extremely useful to me. I am building a method of coordinating between users, but if I could simply share the page state (or, ideally, some subsection of the elements) between all visitors to a given route, then i would have to do a lot less work 😅 . Even if that mechanism were subject to lag - and even though I take it for granted that, as a distributed systems problem, there's no way to fundamentally coordinate (i.e. merge) edits to the page state amongst multiple users without using something like CRDTs or OT (both of which are very much out of scope for a web framework like nicegui) |
Beta Was this translation helpful? Give feedback.
-
Question
How to make a private page annotated with ui.page as public? Is this possible. The usecase for this is: broadcasting video or music at a certain point of time for a certain duration. nicegui really makes this easy for unannotated public page but I want multiple of these public pages, how to acheive that?
Also, I get that an approach using binding actions to app.storage.general is avaiable but that is a little complex than public page
Beta Was this translation helpful? Give feedback.
All reactions