Skip to content

Add another reducer #2

@michszy

Description

@michszy

Hello,

Allow me to first give you a round of applause and a huge thanks, your middleware is quite perfect, very beautiful coding. Yet I failed to see on how I could use it while working with several reducers because as you work with the article_details reducer when adding another reducer and duplicating the code to hold another set of actions, my two reducers collide and having this error :

Given action "API_START", reducer "reducerOne" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.

=> both reducers hold the same case API_START when the middleware dispatch it on onSuccess(data)

My guess is that I would have to split the actions for the middleware to remain untouched and then try to keep the structure of the reducers as it is. What is your opinion ?

While thanking you again,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions