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

[legacy-framework] Add useQuery pagination & add pagination to store example #278

Merged
merged 10 commits into from
Apr 27, 2020
Merged

[legacy-framework] Add useQuery pagination & add pagination to store example #278

merged 10 commits into from
Apr 27, 2020

Conversation

eliashelleborn
Copy link
Collaborator

@eliashelleborn eliashelleborn commented Apr 26, 2020

Type: Feature

Closes: blitz-js/legacy-framework#820

What are the changes and their implications? ⚙️

Blitz useQuery uses usePaginatedQuery from react-query when passing {paginated: true} in options. Also added type for the options argument, it extends react-query QueryOptions.

Added new page in the existing Store example that shows how it can be used. /products/paginated

Breaking change: no

Other information

The return type of the second value from useQuery is now conditional, based on if paginated is true.

I am unsure of which or if any of the new types should be exported.

First PR, happy to be here!

@flybayer
Copy link
Member

Whoa...!! This is amazing!! Fantastic work!!

@all-contributors add @eliasjohansson for code

@allcontributors
Copy link

@flybayer

I've put up a pull request to add @eliasjohansson! 🎉

@flybayer flybayer changed the title useQuery pagination Add useQuery pagination & add pagination to store example Apr 27, 2020
@flybayer flybayer merged commit 040deee into blitz-js:canary Apr 27, 2020
@itsdillon itsdillon changed the title Add useQuery pagination & add pagination to store example [legacy-framework] Add useQuery pagination & add pagination to store example Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement useQuery pagination
2 participants