Skip to content

custom storeKey in connect() and Provider conflict #693

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

Closed
tleunen opened this issue May 4, 2017 · 3 comments · Fixed by #695
Closed

custom storeKey in connect() and Provider conflict #693

tleunen opened this issue May 4, 2017 · 3 comments · Fixed by #695

Comments

@tleunen
Copy link
Contributor

tleunen commented May 4, 2017

connect allows the user to set a custom storeKey, which is interesting when we have multiple store.

But the <Provider> component doesn't allow to set a custom store key. So does connect() only work when using the store as prop instead of context?

Will it make sense to add a function to create a custom provider using a specific store key as well?

@markerikson
Copy link
Contributor

That's... an interesting question. I'd noted that @jimbolla added the storeKey option, but it didn't click that <Provider> still only ever uses store.

Jim, any thoughts?

@jimbolla
Copy link
Contributor

jimbolla commented May 4, 2017

Right. Current Provider can only do store. Depending on how much demand there is for that feature, we should either fully implement the Provider half of it, or just remove it completely.

@timdorr
Copy link
Member

timdorr commented May 5, 2017

Maybe non-store stores can be done like this: <Provider store={store} stores={{ otherStore, anotherStore, etcStore }}>.

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 a pull request may close this issue.

4 participants