MCPcopy Create free account
hub / github.com/adobe/react-spectrum / constructor

Method constructor

packages/dev/s2-docs/src/ExampleOutput.tsx:80–83  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

78
79class ErrorBoundary extends Component<{children: ReactNode}, {error: string | null}> {
80 constructor(props) {
81 super(props);
82 this.state = {error: null};
83 }
84
85 static getDerivedStateFromError(e: Error) {
86 return {error: e.message};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected