Skip to content
This repository was 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

@fodisi

Description

@fodisi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions