For a multitude of cases, I would like to be able to, somehow, connect to data from a collection and have it refresh when something is added or updated. How are we supposed to do this inside Corvid?
page 1: I show a paragraph with text from a collection. “hello world”.
I update this content on page 2.
Without refreshing, page 1 updates.
What is the correct Wix way of setting this behaviour up?
Are you talking about data that gets updated from different devices by different users?
For most of the cases it would be the same user id on different devices. In the future it would be nice to have the same logic for different users on different devices yes. (We’re making some sort of a dynamic website game)
@robin25113 so you should use wix-realtime for that.
You should subscribe to a channel on the relevant pages, and use afeterUpdate and afterUnsert hooks to publish a message to the pages. Once a new message received you should refresh the dataset. See: