Hi I have a question that might be basic but I’m having trouble implementing it.
As a random example, imagine I’m creating a Powerpoint type application. I have a ‘thing’ for each Powerpoint file, then within that Powerpoint file I have a list of slides.
I want a host to be able to present this to multiple users. The host must be able to toggle between slides, and as they do so, the current slide being displayed should change for ALL users, not just the host. So it all needs to be synchronised.
The way I have this set up is by having a custom state called “Current Slide”, which is a number (by default this number is ‘1’, aka the first slide), and as the users clicks ‘Next’ or ‘Back’, it cycles through the list of different slides.
I have this working from the hosts perspective: as they toggle between slides, it displays perfectly on the front end, but this only works for the host, it doesn’t work for anyone else viewing the page.
I’m guessing this has something to do with me using custom states, and custom states not being saved in the database, so these states are only reflect on one persons screen.
How can I make this work, so the front end is synchronised for all users? Do I need to create a data type called’ Current slide’ or something?
Thanks in advance!