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

Migrating the Apollo Example to downshift-examples #997

Closed
haffmaestro opened this issue Apr 13, 2020 · 10 comments
Closed

Migrating the Apollo Example to downshift-examples #997

haffmaestro opened this issue Apr 13, 2020 · 10 comments

Comments

@haffmaestro
Copy link

haffmaestro commented Apr 13, 2020

Thinking about migrating the Apollo Example. But unsure as to what the recommendation is for async rendering of items. Having read, #186 and noticing that all of the new hooks take items as an argument.

What are your thoughts on comboboxes with async items?

Thanks!

@silviuaavram
Copy link
Collaborator

That example should stay as it is, with Downshift component.

If you want to create an async version with useSelect or useCombobox (or both!) please create a separate one and we can add it in the docsite.

I did not create any example using async items so it might be very helpful if you can try it out :)

@haffmaestro
Copy link
Author

@silviuaavram Right that makes sense regarding the Apollo example, I think doing useSelect or useCombobox with async items might be a little weird, have been playing with it though.

@ndeom
Copy link
Contributor

ndeom commented Jul 16, 2020

Hi, is this is this issue still up for grabs? I saw the good first issue tag and thought I would ask.

@silviuaavram
Copy link
Collaborator

Hi @ndeom ! It's still open, let us know if you are creating a PR for it.

@ndeom
Copy link
Contributor

ndeom commented Jul 16, 2020

Sure! I just wanted to quickly discuss the scope of what you would like done before I do. I've taken a look at the Apollo example referenced above, and I'm assuming that you would like this example replicated with the useSelect and useCombobox hooks instead of the Downshift component on codesandbox. Do you want the documentation updated for both hooks to include the examples?

@ndeom
Copy link
Contributor

ndeom commented Jul 21, 2020

@silviuaavram I found some time to redo the Apollo example with the useSelect hook and realized that Apollo had somewhat recently updated to Apollo Client 3.0, which uses the useQuery hook inside of functional components for queries rather than creating higher-order components. Would you like this part of the example updated as well?

@silviuaavram
Copy link
Collaborator

silviuaavram commented Jul 21, 2020 via email

@ndeom
Copy link
Contributor

ndeom commented Jul 31, 2020

@silviuaavram apologies for the delay. Here are links to updated examples for useSelect and useCombobox:
(useSelect) https://codesandbox.io/s/useselect-apollo-example-cglg3?file=/src/index.js
(useCombobox) https://codesandbox.io/s/usecombobox-apollo-example-qhvul?file=/src/index.js .
I tried to make them as similar as possible to the other examples for both of these hooks. I'd really appreciate if you could take a quick look and let me know if these are acceptable. I also have both of them added to the example repo ready for a PR:
https://codesandbox.io/s/downshift-examples-cik7s?file=/src/other-examples/apollo-useCombobox/index.js

@ndeom
Copy link
Contributor

ndeom commented Aug 12, 2020

@silviuaavram just letting you know I created a PR in the example repo

@kentcdodds
Copy link
Member

Looks like this is done 👍

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

4 participants