New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add support for observable spec interop point #1631

Closed
benlesh opened this Issue Apr 18, 2016 · 2 comments

Comments

3 participants
@benlesh
Contributor

benlesh commented Apr 18, 2016

Per the stage 1 observable proposal, there is an interop point that can be added for types that are "observable". It's as simple as adding a [Symbol.observable]() hook that returns a basic observable (it doesn't have to be Rx-based or anything).

Pros

  1. Adding this hook will enable interoperability with RxJS 5, and it should do the same for Kefir, Bacon, Most, and others.
  2. People can stop asking me "what's the difference between RxJS and redux?"
  3. People that want to use a more reactive methodology for delivering state to components can do so without forgoing the wonderful tooling this community has put together
  4. It's a relatively minimal change

Cons

Need to include a small Symbol.observable shim. Should probably add some integration test to a common library which adds one development-time dependency.

attn/ @gaearon @zenparsing

benlesh added a commit to benlesh/redux that referenced this issue Apr 18, 2016

feat(store): add observable proposal interop to store
- Adds `Symbol.observable` method to the store that returns a generic observable
- Adds tests to ensure interoperability. (rxjs 5 was used for a simple integration test, and
  is a dev only dependency)

closes #1631
@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Apr 18, 2016

Collaborator

Looks 👍 to me!

Collaborator

gaearon commented Apr 18, 2016

Looks 👍 to me!

@gaearon gaearon added the enhancement label Apr 18, 2016

benlesh added a commit to benlesh/redux that referenced this issue Apr 18, 2016

feat(store): add observable proposal interop to store
- Adds `Symbol.observable` method to the store that returns a generic observable
- Adds tests to ensure interoperability. (rxjs 5 was used for a simple integration test, and
  is a dev only dependency)

closes #1631

benlesh added a commit to benlesh/redux that referenced this issue Apr 19, 2016

feat(store): add observable proposal interop to store
- Adds dependency on `symbol-observable` to pull in `Symbol.observable`
- Adds `Symbol.observable` method to the store that returns a generic observable
- Adds comprehensive tests to ensure interoperability. (rxjs 5 was used for a simple integration test, and
  is a dev only dependency)

closes #1631

benlesh added a commit to benlesh/redux that referenced this issue Apr 19, 2016

feat(store): add observable proposal interop to store
- Adds dependency on `symbol-observable` to pull in `Symbol.observable`
- Adds `Symbol.observable` method to the store that returns a generic observable
- Adds comprehensive tests to ensure interoperability. (rxjs 5 was used for a simple integration test, and
  is a dev only dependency)

closes #1631

@gaearon gaearon closed this in #1632 Apr 19, 2016

gaearon added a commit that referenced this issue Apr 19, 2016

feat(store): add observable proposal interop to store
- Adds dependency on `symbol-observable` to pull in `Symbol.observable`
- Adds `Symbol.observable` method to the store that returns a generic observable
- Adds comprehensive tests to ensure interoperability. (rxjs 5 was used for a simple integration test, and
  is a dev only dependency)

closes #1631
@xirzec

This comment has been minimized.

Show comment
Hide comment
@xirzec

xirzec May 12, 2016

This dependency seems to break using Redux with TypeScript and webpack: TypeStrong/ts-loader#192

xirzec commented May 12, 2016

This dependency seems to break using Redux with TypeScript and webpack: TypeStrong/ts-loader#192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment