Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Redux Store w/ initial state integrated to Drizzle's internal store #98

Open
fodisi opened this issue Aug 20, 2020 · 4 comments
Open

Redux Store w/ initial state integrated to Drizzle's internal store #98

fodisi opened this issue Aug 20, 2020 · 4 comments

Comments

@fodisi
Copy link

fodisi commented Aug 20, 2020

I'm working to integrate an existing Drizzle app into another existing app - I'll name it "the Main app" - that also has it's own redux store. The Drizzle app will become a "component/submodule" of the Main app.
The existing Drizzle app already uses drizzle's internal store, with no initial state set.
The Main app, already has its own store, and has a some initialization to the store's initial state (passing the "initialState" to redux's "createStore" method).
I'd like to be able to use a single store, integrating Main app's store w/ Drizzle app by using Drizzle's "generateStore" method.

However, checking this method on generateStore.js it doesn't seem to accept an external state (i.e., appState) that could be merged w/ drizzle's "initialContractState" (as it does to appReducers, appSagas, appMiddlewares), making it difficult to initialize the app state external to drizzle.
Would you have any recommendations on how to accomplish the scenario above?

Is submitting a PR to accept an "appState" in the drizzle's "generateStore" method an option or something that you think would be worth doing?

Thank you.

@cds-amal
Copy link
Member

@fodisi sure, I think this is worthwhile.

@fodisi
Copy link
Author

fodisi commented Aug 25, 2020

Great, @cds-amal . I'll work on it and submit a PR soon. Thank you.

@fodisi
Copy link
Author

fodisi commented Sep 2, 2020

@cds-amal ,
I just submitted PR 100 to address this issue.
Let me know your thoughts.

@ghost
Copy link

ghost commented Oct 23, 2020

what is the status of this? it currently seems like it's not possible to integrate drizzle into an existing store. does this PR solve that issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants