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

hooks api #683

Closed
sibelius opened this issue Mar 4, 2019 · 9 comments
Closed

hooks api #683

sibelius opened this issue Mar 4, 2019 · 9 comments

Comments

@sibelius
Copy link

sibelius commented Mar 4, 2019

Every render props can be replaced with hooks api

I think it makes sense to provide hooks apis for downshift, after the hooks apis landed, we can start rewriting the core of it to use hooks

what do you think?

related to this https://twitter.com/sseraphini/status/1102602849152843776

@silviuaavram
Copy link
Collaborator

it makes sense and I like the idea. I just did not have time myself to explore it.

@sibelius
Copy link
Author

this could be a good benchmark https://github.com/react-dropzone/react-dropzone

@hardikmodi1
Copy link

I have just started looking at hooks and it is really amazing. I like the idea to rewrite it with hooks.

@steveoh
Copy link

steveoh commented Jun 12, 2019

This package can still be used in a function component using hooks without any changes correct?

@elsangedy
Copy link

Hey guys, what do you think? any suggestion? I'll work in a PR

https://github.com/elsangedy/use-downshift

@silviuaavram
Copy link
Collaborator

silviuaavram commented Jun 29, 2019

That is great news! I only wished that this did not appear out of nowhere. But nevertheless it's a very awesome work! We should aim to collaborate for a unified solution.

I am also working on https://github.com/silviuavram/downshift-hooks. I am close to release it as npm which is what I will do since I came this far. My idea was to start with a normal dropdown hook and have hooks for each: dropdown and combobox, single and multiple. Those are different patterns in ARIA and maybe it's better to have separate logic for each.

What do you think?

Edit: released the first hook in downshift-hooks.

@sibelius
Copy link
Author

can we run both implementation on tests of this repo, so we can make sure they don't break anything

@elsangedy
Copy link

@silviuavram great job with downshift-hooks!
I agree with you and I think we should follow through with your project, I would like to help.

@sibelius good idea, we can try to apply the same test suite of this repo

@silviuaavram
Copy link
Collaborator

#860 code already in for useCombobox Will release tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants