Module

React.Basic.Hooks.ErrorBoundary

Package
purescript-react-basic-hooks
Repository
spicydonuts/purescript-react-basic-hooks

#mkErrorBoundary Source

mkErrorBoundary :: String -> Effect (({ dismissError :: Effect Unit, error :: Maybe Error } -> JSX) -> JSX)

Create a React error boundary with the given name. The resulting component takes a render callback which exposes the error if one exists and an effect for dismissing the error.