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

Multiple Stores Overwrite on last store #197

Open
adminy opened this issue Dec 8, 2021 · 0 comments
Open

Multiple Stores Overwrite on last store #197

adminy opened this issue Dec 8, 2021 · 0 comments

Comments

@adminy
Copy link

adminy commented Dec 8, 2021

Rather than merging store with previous store I would like to have them separately. E.g.

const AuthStore = ({ children }) => <Provider store={pageStore}>{children}</Provider>
const PageStore = ({ children }) => <Provider store={authStore}>{children}</Provider>

render(
  <AuthStore>
    <PageStore>
       ...
    </PageStore>
  </AuthStore>
, document.body)

But currently when I try to use the stores in a component:

const A = connect('page', 'auth')(({ page, auth, children }) => (
     // page is defined but not auth
)

it seems like Page provider overwrites the Auth provider.

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

No branches or pull requests

1 participant