UNPKG

@winglet/react-utils

Version:

React utility library providing custom hooks, higher-order components (HOCs), and utility functions to enhance React application development with improved reusability and functionality

9 lines (6 loc) 290 B
import { jsx } from 'react/jsx-runtime'; import { ErrorBoundary } from './ErrorBoundary.mjs'; const withErrorBoundary = (Component, fallback) => { return (props) => (jsx(ErrorBoundary, { fallback: fallback, children: jsx(Component, { ...props }) })); }; export { withErrorBoundary };