After redux+normalizr formulates the request data, how to append the subsequent request data, dispatch multiple times?

suppose my state tree is as follows:

  • view.
  • blogList

    • blogId
    • comments [array]
    • userInfo
    • .

after being modeled by normalizr library

  • view.
  • result: [.blogId]
  • entities

    • userInfo
    • comments
    • .

structure of reducer

dispatch(updateResultReducer(result));
dispatch(updateUserInfoReducer(userInfo));
// ...

or is there something wrong with the design of state and schema?

Feb.18,2022
Menu