componentDidCatch(error, errorInfo) {
    // You can also log the error to an error reporting service
    //logErrorToMyService(error, errorInfo);
    console.error(error);

    if (!this.state.reported) {
      const data = {
        message: error.message,
        stack: (error && error.stack) || "",
      };

      fetch("/crashlog/", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "CSRF-Token": _sc_globalCsrf,
        },
        body: JSON.stringify(data),
      });
      this.setState({ reported: true });
    }
  }
@param {object} error
@param {object} errorInfo
@returns {void}