silverwolf-x's picture
download
raw
646 Bytes
'use client'
import { Component } from 'react'
class MyErrorBoundary extends Component {
static getDerivedStateFromError(error) {
return { error }
}
state = { error: null }
render() {
if (this.state.error) {
return 'failed'
}
return this.props.children
}
}
function Inner() {
return (
<MyErrorBoundary>
<Thrower />
</MyErrorBoundary>
)
}
function Thrower() {
useErrorHook()
}
function useThrowError() {
if (typeof window !== 'undefined') {
throw new Error('browser error')
}
}
function useErrorHook() {
useThrowError()
}
export default function Page() {
return <Inner />
}

Xet Storage Details

Size:
646 Bytes
·
Xet hash:
8f378ddaeef21c3d5cef159b4782e396a5dc7dfed19e3043980dbf04a11cbd77

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.