-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor use-search to use a properly-typed fuzzy-search library #197
Comments
Highly recommend switching to a properly typed library, e.g. fusejs |
Issue + tasks list updated. |
Itemsjshttps://bundlephobia.com/package/[email protected] Size: 64kB Fuse.jshttps://bundlephobia.com/package/[email protected] Size: 15kB But yes, this is a big refactor. |
Since this issue is classified as The hard part is you need to tackle all cases, testing it, make sure it's not breaking. From my personal experience, testing using a manual way when you're not the original creator is very risky. |
Found more issues with A quick peek through the bundle analyser shows that it's coming from We need to expedite moving away from itemsjs. Should we proritise this issue, or should we wait until the Typesense experiment at #374 is complete? Or more importantly, which one of these takes the least effort? |
Closing this issue in favour of the #374. |
Brief
The current
useSearch()
implementation uses theitemsjs
library, which has no proper typings. This leads touseSearch()
being littered withany
type annotations.We want to avoid using
any
if possible. Therefore, we should migrate to a search library with proper typings (e.g. fusejs).Definition of done
use-search
properly migrated to a library with valid typings.any
are replaced by correct typings.Tasks
use-search
to use fusejs and add proper typingsThe text was updated successfully, but these errors were encountered: