UNPKG

foxact

Version:

React Hooks/Utils done right. For browser, SSR, and React Server Components.

1 lines 252 B
import"client-only";import{useState as r}from"react";function t(r){return!1!==r&&null!=r}function o(){let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[n,e]=r(!1);if(t(o))throw o;if(t(n))throw n;return e}export{o as useErrorBoundary};