Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support custom DataProvider type with useDataProvider #6605

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Sep 21, 2021

image

@djhi djhi added the RFR Ready For Review label Sep 21, 2021
@djhi djhi added this to the 3.19 milestone Sep 21, 2021
@@ -201,6 +204,7 @@ export const useQueryWithStore = <State extends ReduxState = ReduxState>(
queriesThisTick[requestSignature] = new Promise<PartialQueryState>(
resolve => {
dataProvider[type](resource, payload, options)
// @ts-ignore
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's one thing I wasn't able to address: ensuring that a dataProvider method always returns a Promise. Hence the ignore

@fzaninotto fzaninotto merged commit 5d6b420 into next Sep 27, 2021
@fzaninotto fzaninotto deleted the use-dataprovider-type branch September 27, 2021 07:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants