Skip to content

react hook for automated fallback/redirection based on fast-lev

License

Notifications You must be signed in to change notification settings

sambacha/safe-result-boundry

Repository files navigation

result boundry, a react hook for automated intelligent redirects

Motivation

safe-result-boundry provides React's Error Boundaries coupled with a fallback mechanism for redirecting users both to sending/opening a support ticket, and returning them to a best-case closest match result of their original attempted query. If no best-case can be calculated, it should present the user with options as to how to proceed.

Example: Incorrect Contract Address

The inital version of this hook works by applying fast-lev matching on a Uniswap Tokenlist for approximating which Token the user was trying to navigate towards.

see reactjs docs

Overview

Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.

Specification

see 'css-contain'

Usage

🚧

see safe-result library, (w.i.p)

License

MPL-2.0