/
aqa
/
claude-code
Обзор
Документация
Войти
/
aqa
/
claude-code
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/SentryErrorBoundary.ts
28 строк
487 B
kuberwastaken
new initial commit (history rewritten)
01 апр 2026, 14:57
01 апр 2026, 14:57
c1996f2
Код
Авторство
О чём код?
import * as React from 'react' interface Props { children: React.ReactNode } interface State { hasError: boolean } export class SentryErrorBoundary extends React.Component<Props, State> { constructor(props: Props) { super(props) this.state = { hasError: false } } static getDerivedStateFromError(): State { return { hasError: true } } render(): React.ReactNode { if (this.state.hasError) { return null } return this.props.children } }