Skip to content

Allow custom stores to set custom enhancers (middlewares) #7417

@mitogh

Description

@mitogh

Looking into a way to extend the implementation for custom stores, specifically to inject custom middlewares it seems like at the moment this is not possible.

I think this is really helpful mechanism for us (as developers) to decrease complexity from store into middleware or stuff like async actions, as having selctors and resolvers does not fill all scenarios to handle REST actions.

I was looking at #692 however that one is related to the store used internally not for the ones created by third party.

Describe the solution you'd like

I think by adding a new parameter to this function: registerStore as an array for custom enhancers and for registerReducer so this can be set directly when the store is created.

As at the moment the stores only have a single enhancer which is the one used to debug (which is great BTW).

But I think having the opportunity to add custom enhancers here would be great.

Describe alternatives you've considered

Happy to collaborate with a PR for this in order to allow the extension of custom stores as well.

Just wanted to drop the ideas in an issue before moving ahead with that.

Please let me know your thoughts on that one.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] ExtensibilityThe ability to extend blocks or the editing experience[Status] Not ImplementedIssue/PR we will (likely) not implement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions