Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sambacha/safe-result-boundry

react hook for automated fallback/redirection based on fast-lev
https://github.com/sambacha/safe-result-boundry

error-boundry ethereum fallback fast-levenshtein levenshtein-distance react react-hook redirect result-boundry web3

Last synced: 23 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# [safe-result-boundry](#)

> 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.

## [Error Boundaries](#)

> [see reactjs docs](reactjs.org/docs/error-boundaries.html)

## 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' ](https://drafts.csswg.org/css-contain/)

## Usage

🚧

> [ see `safe-result` library, (w.i.p)](https://github.com/sambacha/safe-result)

## License

MPL-2.0