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

Wrap RouterContainer children in ResourceContainer, pass resourceData and resourceContext to it #27

Open
rohan-deshpande opened this issue Jun 25, 2020 · 0 comments

Comments

@rohan-deshpande
Copy link
Collaborator

rohan-deshpande commented Jun 25, 2020

Doing this will give us some level of separation of concerns between the two stores. Currently inside of bootstrapStore we imperatively get the resource store, but we would not need to do this if we did the following

      <RouterContainer
        routes={routes}
        history={history}
        isGlobal={isGlobal}
      >
        <ResourceContainer 
            isGlobal={isGlobal} 
            resourceContext={resourceContext} 
            resourceData={resourceData}
         >
          {children}
        </ResourceContainer>
      </RouterContainer>

Then we would need a bootstrapStore method inside the ResourceContainer to do this in the onInit

  actions.hydrate({ resourceContext, resourceData });
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