Landing Page Question #3903
-
Hi guys, we are currently working on a hassle-free way to display the current users of worlds inside of hubs rooms. We decided that this can be done by livestreaming the landing page into hubs. We are doing this with OBS, but have a question: Is the landing page programmed to automatically refresh after a few seconds so that usage numbers inside the rooms stay up to date? If not, is there a way to achieve this without having to refresh the whole browser every time? Thanks for your help so far, we are getting closer! Felix Krell |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello Felix! The landing page is not programmed to automatically refresh after a few seconds. You can set up a custom client and set up an interval on that component's Happy to expand more if you need it! |
Beta Was this translation helpful? Give feedback.
Hello Felix!
The landing page is not programmed to automatically refresh after a few seconds.
You can set up a custom client and set up an interval on that component's
useState
react hook to pull the numbers every few seconds. Remember to includeclearInterval
in the clean up function in theuseState
react hook. When one part of state is changed, react updates only the components and downstream components that rely on that changed piece of state. If you only update that one occupants number, it will not refresh the whole page, only that component.Happy to expand more if you need it!