You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As in Similar to onSignalXXX hooks of react-vega. This means getting into some of vega's stateful bits, so may be a nice opportunity to look at dataflow in and out, and how to optimize against rerendering and vega compilation. Ideally, we'd have a really high level way of plugging into signals at different levels.
The text was updated successfully, but these errors were encountered:
This issue sort of missed the mark; At the time, react-vega was using an awkward set of onSignalXXX handlers. They've since moved to more general signalListeners option which points to an object mapping of signal names to handler functions:
I think this makes a lot more sense, and we could do something similar here (probably :signal-handlers, :data-handlers, :event-listeners and :resize-listeners in our case).
Now that we have #13 (access to the vega view object), it's possible to call .addSignalListener etc. on this object directly to get this functionality. So in a way this is somewhat low priority now.
Still, it would be nice to be able to avoid the additional level of callbacks and not have to mess with the view api for basic use cases such as this. There's also potentially some advantage in us explicitly managing the calls to the underlying vega view functions, so that multiple handlers aren't being attached when components update (I this this might only be an issue in certain cases, but will be important to scope out if we implement these conveniences).
metasoarous
changed the title
Add listener options for vega and vega-lite components
Add {signal,data,event,resize} listener options reagent components
Oct 4, 2021
As inSimilar tohooks of react-vega. This means getting into some of vega's stateful bits, so may be a nice opportunity to look at dataflow in and out, and how to optimize against rerendering and vega compilation. Ideally, we'd have a really high level way of plugging into signals at different levels.onSignalXXX
The text was updated successfully, but these errors were encountered: