Accessing a part of reducer state from one reducer within another reducer

前端 未结 3 1897
余生分开走
余生分开走 2020-12-03 02:50

I do not know how to access a boolean isLoading flag from reducerForm.js reducer in reducerRegister.js. I have used combineReduc

3条回答
  •  臣服心动
    2020-12-03 03:48

    React Redux works on unidirectional data flow.

    Action ---> Reducer /store ---> Reducer
    

    Reducer works on small subset of store, you can not access store inside reducer which is not part of Reducer. you can either need to fire new action from the component based on reducer state return.

提交回复
热议问题