Files
next.js/test/development/app-dir/owner-stack/app/browser/uncaught/page.js

17 lines
251 B
JavaScript

'use client'
function useThrowError() {
if (typeof window !== 'undefined') {
throw new Error('browser error')
}
}
function useErrorHook() {
useThrowError()
}
export default function Page() {
useErrorHook()
return <p>hello world</p>
}