Skip to content
This repository has been archived by the owner on Jun 18, 2018. It is now read-only.

Expose higher-level Observable API #10

Closed
gaearon opened this issue Mar 14, 2015 · 1 comment
Closed

Expose higher-level Observable API #10

gaearon opened this issue Mar 14, 2015 · 1 comment

Comments

@gaearon
Copy link
Member

gaearon commented Mar 14, 2015

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.

@gaearon
Copy link
Member Author

gaearon commented Apr 16, 2015

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.

@gaearon gaearon closed this as completed Apr 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant