Expose higher-level Observable API
gaearon opened this issue · comments
We want to expose an API consumable by React 0.14 with the new observe
hook for sideways data loading.
The observable we expose from DnD Core will register a drag source (or drop target) on subscribe
, unregister it on unsubscribe
and, given (context, backend) => data
, return a stream of data that gets pushed on every context
change event.
We will also probably try to separately build a higher-order component to polyfill observe
until React 0.14 ships with it.
We're now exposing subscribe(listener[, handlerIds]) : unsubscribe()
. This is not really an observable but comes close, and we're not going to use observe
hook anyway (yet?). We may revisit this after React 0.14.