Skip to content
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

Autocomplete violates hooks rules #74

Closed
rsimon opened this issue Aug 2, 2021 · 0 comments
Closed

Autocomplete violates hooks rules #74

rsimon opened this issue Aug 2, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@rsimon
Copy link
Member

rsimon commented Aug 2, 2021

The Autocomplete dropdown (used in the tag widget as well as the comment widet when purposes are enabled) violates the rules of React hooks: it uses useCombobox inside a class component. Interestingly, this doesn't seem to bother Preact at all, but fails when importing RecogitoJS/Annotorious from source into your own React project.

More generally, the Downshift Autocomplete is horrible + has a large memory footprint. In the long run, it would be better to simply kick it out and replace with a hand-rolled solution that does exactly what we need, and not more.

@rsimon rsimon added the bug Something isn't working label Aug 2, 2021
@rsimon rsimon closed this as completed in fbdcdd1 Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant