Skip to content

feat(react-kit): accept defaultProps in withrx selector result #83

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

Merged
merged 3 commits into from
Oct 17, 2018

Conversation

raveclassic
Copy link
Contributor

@raveclassic raveclassic commented Oct 17, 2018

This allows to pass handlers along with props in WithRXSelector

BREAKING CHANGES:

  • defaultProps argument is moved to WithRXSelectorResult;
  • static defaultProps property is removed;
  • props$ stream passed to selector doesn't contain fields from defaultProps anymore
  • withRX now accepts Target separately for better type inference in props/defaultProps

This allows to pass handlers along with props in WithRXSelector

BREAKING CHANGE: 1. defaultProps argument is moved to WithRXSelectorResult; 2. static defaultProps property is removed; 3. props$ stream passed to selector doesn't contain defaultProps anymore
Copy link
Contributor

@sutarmin sutarmin left a comment

Choose a reason for hiding this comment

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

Cool. Now we have correct type inference and autocomplete in defaultProps, and also no longer needed to wrap callbacks into Observables to return them from withRX, we can just pass callbacks through defaultProps.

@raveclassic raveclassic merged commit 471706f into master Oct 17, 2018
@raveclassic raveclassic deleted the feature/accept-default-props-in-with-rx-selector branch October 17, 2018 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants