React, initiates a request using this.props.dispatch (actions.update), but does not execute

problem description

react redux, initiates a request using this.props.dispatch (actions.update) , but does not execute

the environmental background of the problems and what methods you have tried

The

interface is a tab switch. When clicked,
this.props.dispatch (actions.fetchALLlevels)

is called when the component componentWillMount is clicked. The

console can print the action, but the request is not sent

related codes

// 
import { ofType } from "redux-observable";
import { of } from "rxjs";
import { switchMap, map, catchError } from "rxjs/operators";
import { ajax } from "rxjs/ajax";

import * as actions from "../actions/level";

export const fetchAllLevels = action$ =>

  action$.pipe(
    ofType(actions.fetchAllLevels),
    switchMap(() =>
      ajax({
        url: "/api/v1/rank/get",
        method: "GET",
        headers: {
          Authorization: localStorage.getItem("token"),
        },
      }).pipe(
        map(data => {
          actions.fetchAllLevelsSuccess(data.response)}),
        catchError(err => {
          toastr.error("");
          return of(actions.fetchAllLevelsError(err));
        }),
      ),
    ),
  );
Aug.17,2021

Apple's requirements for SSL certificates are stricter than Android's. Confirm the validity of the certificate

-
just encountered the same problem, come to add a wave

Menu