Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sambacha/safe-result-boundry
- Owner: sambacha
- License: mit
- Created: 2022-07-19T12:51:22.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-20T14:30:34.000Z (about 2 years ago)
- Last Synced: 2024-10-05T15:42:42.994Z (about 1 month ago)
- Topics: error-boundry, ethereum, fallback, fast-levenshtein, levenshtein-distance, react, react-hook, redirect, result-boundry, web3
- Language: TypeScript
- Homepage:
- Size: 317 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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