How does reducer get data from the background to initialize store?

I want to write that the value of state is retrieved from the background when reducer, is initialized. How should it be implemented?
whether to use redux-thunk directly dispatch a function operation interface or state? that dispat already exists when using other action

add:
I want to initialize state, by getting values from the background. All operations on the data are based on this state.
, which is the format of the db.json that fetches the data in the background.
{

"user": [
  {
    "id": 10000,
    "name": "",
    "student_id": 2018214001,
    "gender": "male"
  },
  {
    "id": 10001,
    "name": "",
    "student_id": 2018214002,
    "gender": "female"
  },
  {
    "id": 10002,
    "name": "",
    "student_id": 2018214003,
    "gender": "female"
  }
],
"book": [
  {
    "id": 10000,
    "name": "JavaScript",
    "price": 45,
    "owner_id": 10000
  },
  {
    "id": 10001,
    "name": "Java",
    "price": 67,
    "owner_id": 10001
  }
]

}

what I want to do is to split user and book into two render, that manages two state, respectively and then binds the router to the onEnter event when entering the page, which requests fetch through the store.dispatch (fn ()), fn, and assigns the returned value to state.

I don"t know if this will work, because it"s stuck in the middle, and I don"t know how to say that the merged state is the same as the bd.json format. I"m still a little confused about redux. Thank you for your guidance.

Mar.03,2021

let initState={

}
function userReducer(state=initState,action){
  switch(action.type){
    case 'REQUEST_USER_LIST':
    return Object.assign({},state,{user:action.payload})
    case 'REQUEST_BOOK_LIST':
    return Object.assign({},state,{book:action.payload})
    default:
    return state;
  }
}

A function is returned in the function that acquires data asynchronously according to this mode. The parameter received by this function is dispatch an existing action or actionCreate function after dispatch, enters the function. Action

according to the success or failure of the returned data dispatch.
Menu