A macro and predefined component that can create a boundary above which errors cannot propagate. Read the docstring
of error-boundary
carefully. Works with server-side rendering as well, and provides for development-time retries
to recover after a hot code reload without having to reload the entire page.
A macro and predefined component that can create a boundary above which errors cannot propagate. Read the docstring of `error-boundary` carefully. Works with server-side rendering as well, and provides for development-time retries to recover after a hot code reload without having to reload the entire page.
A (fn [react-element exception] what-to-render)
. Called in order to render an alternate for UI segments that have crashed.
Defaults to a simple div containing the error header and message as standard HTML elements.
A `(fn [react-element exception] what-to-render)`. Called in order to render an alternate for UI segments that have crashed. Defaults to a simple div containing the error header and message as standard HTML elements.
(error-boundary & body)
Wraps the given children in a nested pair of stateless elements that prevent unexpected exceptions from propagating up the UI tree. Any unexpected rendering or lifecycle errors that happen will be caught and cause an error message to be shown in place of the children.
You can also completely take over the error boundary rendering by binding
or by setting to root binding of render-error
via set!
in cljs, and alter-var-root
in Clojure.
Wraps the given children in a nested pair of stateless elements that prevent unexpected exceptions from propagating up the UI tree. Any unexpected rendering or lifecycle errors that happen will be caught and cause an error message to be shown in place of the children. You can also completely take over the error boundary rendering by `binding` or by setting to root binding of *render-error* via `set!` in cljs, and `alter-var-root` in Clojure.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close