Back

Version 46

11/18/2024
/** @jsxImportSource https://esm.sh/react */
import React, {
useState,
useEffect,
useRef,
useCallback,
StrictMode,
Component
} from "https://esm.sh/react";
import ReactDOM from "https://esm.sh/react-dom";

// Error Boundary Component
class ErrorBoundary extends Component {
constructor(props) {
super(props);
this.state = {
hasError: false,
error: null,
errorInfo: null
};
}

static getDerivedStateFromError(error) {
// Update state so the next render will show the fallback UI.
return { hasError: true };
}

componentDidCatch(error, errorInfo) {
// You can also log the error to an error reporting service
console.error("Uncaught error:", error, errorInfo);
this.setState({
error: error,
errorInfo: errorInfo
});
}

bladesquad-thrillingamaranthkiwi.web.val.run
Updated: November 18, 2024