A
Social
Collaborative Editing
Two users editing the same document. When User A saves, User B's view refreshes automatically — and vice versa. No websocket setup required.
What to watch for
- ▶Edit the document as User A and click Save
- ▶User B's panel glows green and shows the updated content without any interaction
- ▶The 'Last edited by' field updates to show which user made the last change
- ▶Both panels share the same tag: socialTags.documents.byId('shared-1')
- ▶Open in two browser tabs to simulate two real users
B
User B
How invalidation works here
Shared tag
socialTags.documents.byId("shared-1")On save
invalidateTags([documents.byId("shared-1")])Result
All queries with this tag refetch — both panels update