Skip to content
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

Push initial value to Redux selector observers #75

Merged
merged 4 commits into from
Sep 25, 2018

Conversation

troch
Copy link
Collaborator

@troch troch commented Sep 25, 2018

Making it consistent with prop observable. It was removed a month ago, I think by mistake.

Most implementation bugged me: .startWith(initialValue) doesn't work... but .merge(of(initialValue)) does. 🤷‍♂️

@troch troch added bug Something isn't working redux Something related to Redux packages rxjs Something related to RxJS bindings xstream Something related to xstream bindings most Something related to Most bindings callbag Something related to Callbag bindings labels Sep 25, 2018
@@ -29,7 +29,7 @@ Each observed action is passed into your stream with all its data - including th

## Observing State

If you pass in a function, `store.observe` will treat it as a Redux selector, and return a stream which subscribes to the state using your function. Any time the selected slice of state changes, its new value will be piped to your stream.
If you pass in a function, `store.observe` will treat it as a Redux selector, and return a stream which subscribes to the state using your function. It is initialised with the selector current value and any time the selected slice of state changes, its new value will be piped to your stream if changed (`===` comparison).
Copy link
Collaborator

Choose a reason for hiding this comment

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

selector -> selector's, plus comma after current value?

Copy link
Collaborator

@thisRaptori thisRaptori left a comment

Choose a reason for hiding this comment

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

👍

@troch troch merged commit af6a31e into master Sep 25, 2018
@troch troch deleted the fix/redux-selector-observer branch September 25, 2018 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working callbag Something related to Callbag bindings most Something related to Most bindings redux Something related to Redux packages rxjs Something related to RxJS bindings xstream Something related to xstream bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants