Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Update rxjsObservableConfig for rxjs 6 #660

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update rxjsObservableConfig for rxjs 6 #660

wants to merge 2 commits into from

Conversation

wuct
Copy link
Contributor

@wuct wuct commented May 1, 2018

Need some discussion before merging:

  1. There were rxjs4ObservableConfig.js and rxjsObservableConfig.js (for rxjs 5) before. This PR upgrade rxjsObservableConfig.js directly to adopt rxjs 6, but it's a breaking change. We might want to create separate files for both rxjs 5 and rxjs 6.

  2. Rxjs used to polyfill Symbol.observable, but it has been removed since feat(Symbol.observable): is no longer polyfilled ReactiveX/rxjs#3387. We might need to add a notice about polyfill Symbol.observable to the doc.

@@ -93,20 +109,3 @@ test('complete props stream before unmounting', () => {
wrapper.unmount()
expect(counter).toBe(0)
})

test('completed props stream should throw an exception', () => {
Copy link
Contributor Author

@wuct wuct May 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like rxjs 6 doesn't throw this error anymore. I need dig deeper into this test.

@istarkov
Copy link
Contributor

istarkov commented May 1, 2018

What are u think to split library on 2, ie recompose and recompose-rx(-observable, -blabla) and move all the streaming parts out of the recompose library.

Also I think we can move on https://github.com/facebook/react/tree/master/packages/create-subscription to support async in the future

@wuct
Copy link
Contributor Author

wuct commented May 5, 2018

It would be a good idea to separate them. But I'm thinking about keeping the es-observable parts remain in Recompose and move only those 3rd-party-config files into other libraries. The reason for me to separate them is to have better version controlling.

And yes, I think we need to introduce create-subscription to handle streaming events.

@OliverJAsh
Copy link

RxJS 6 has been out for awhile now. Is this PR good to merge? Re. the suggestion of moving 3rd-party-config files into other libraries, perhaps keep that idea to a separate PR, so we can unblock this one?

@elmarburke
Copy link

For those people waiting for this PR, there is a simple configuration possible to get recompose working with RxJS@^6.0.0:

import { from } from 'rxjs';

setObservableConfig({
  fromESObservable: from,
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants