Concorde guide — Legacy: Sharing data. > New apps: Data flow (get / set / DataProviderKey, decorators). This page documents the historical Publisher proxy API (PublisherManager, publisher.set, onAssign, …). Doc ID: docs/_getting-started/pubsub. Keywords: Concorde, supersoniks, docs/_getting-started/pubsub, pubsub, Legacy: Sharing data, guide, get, set, DataProviderKey, PublisherManager, publisher.set, onAssign, {foo:{hello:["world"]}, bar:"baz"}, myPublisher.foo.hello, null. URL: https://concorde.supersoniks.org/crawl/docs/_getting-started/pubsub.html.
Legacy: Sharing data
New apps: Data flow (
get/set/DataProviderKey, decorators). This page documents the historical Publisher proxy API (PublisherManager,publisher.set,onAssign, …).
This section describes how data is shared between graphical and non-graphical components.
Graphical components should not reference each other directly — they stay decoupled via a publish/subscribe store.
The Publisher
Principle
The publisher is a JavaScript proxy that holds data.
Example:{foo:{hello:["world"]}, bar:"baz"}Accessing a property (
myPublisher.foo.hello) returns another publisher for that segment.Missing properties create a publisher with internal data
null, filled later.Subscribers listen via
onAssign,onInternalMutation, template filling on the Subscriber mixin, etc.Updates use
publisher.set(...)or nested assignment; changes propagate to subscribers.
❇️ Order of creation vs subscription theoretically does not matter.
Methods
- set — replace internal value
publisher.set({foo:{hello:["world"]}, bar:"baz"});
- get — read internal value
publisher.get()
- onAssign / offAssign — react to
set
publisher.a.b.onAssign(console.log);
Modern equivalent: get / set / @handle — see Data flow.