Open fodisi opened 3 years ago
@fodisi sure, I think this is worthwhile.
Great, @cds-amal . I'll work on it and submit a PR soon. Thank you.
@cds-amal , I just submitted PR 100 to address this issue. Let me know your thoughts.
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?
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.