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

Add a way to create a Provider using a specific store key #695

Merged
merged 3 commits into from May 12, 2017

Conversation

tleunen
Copy link
Contributor

@tleunen tleunen commented May 10, 2017

This is related and fix #693. It offers an easy way to create a custom provider using a specific store key.

connect already supported that feature, but the Provider was missing it.

@markerikson
Copy link
Contributor

Hmm. Just from a maintenance standpoint, does createProvider() actually need to be off in its own file? I think I'd prefer to see it in the existing file so that we can minimize the history churn.

Other than that, this seems reasonable at first glance in terms of concept and implementation.

@tleunen
Copy link
Contributor Author

tleunen commented May 10, 2017

Sure. I changed it. Let me know if you'd like something else.
No rush, take your time to review.

Provider.propTypes = {
store: storeShape.isRequired,
children: PropTypes.element.isRequired,
};
Copy link
Member

Choose a reason for hiding this comment

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

Nit: no semicolons

@markerikson
Copy link
Contributor

I assume if we squash this, it wouldn't reflect the back-and-forth between files, right?

@tleunen
Copy link
Contributor Author

tleunen commented May 10, 2017

It would reflect this: https://github.com/reactjs/react-redux/pull/695/files
I can manually squash if you'd like (after removing the extra semicolon)

@timdorr
Copy link
Member

timdorr commented May 10, 2017

No need, we can squash on GitHub now. I do it every time, since it provides a nice link back to this PR.

Copy link
Member

@timdorr timdorr left a comment

Choose a reason for hiding this comment

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

LGTM. Anyone else want to second?

@markerikson
Copy link
Contributor

👍

Hit it!

@timdorr timdorr merged commit f472fba into reduxjs:master May 12, 2017
@tleunen tleunen deleted the fix/storekey-provider branch May 12, 2017 00:49
josepot pushed a commit to josepot/react-redux-lean that referenced this pull request Sep 21, 2018
* Add a way to create a Provider using a specific store key

* Move createProvider inside Provider.js

* Remove semicolons
webguru7 pushed a commit to webguru7/react-redux that referenced this pull request Dec 8, 2022
* Add a way to create a Provider using a specific store key

* Move createProvider inside Provider.js

* Remove semicolons
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.

custom storeKey in connect() and Provider conflict
3 participants