Skip to content

feat(core): add generic type support to useDataProvider#7448

Open
KakiDhonesh wants to merge 2 commits into
refinedev:mainfrom
KakiDhonesh:feat/use-data-provider-generic-type
Open

feat(core): add generic type support to useDataProvider#7448
KakiDhonesh wants to merge 2 commits into
refinedev:mainfrom
KakiDhonesh:feat/use-data-provider-generic-type

Conversation

@KakiDhonesh

@KakiDhonesh KakiDhonesh commented Jun 6, 2026

Copy link
Copy Markdown

Summary

Adds generic type support to useDataProvider, allowing custom data providers to be used with their own types without manual casting.

Changes

  • Added a generic type parameter to useDataProvider
  • Preserved the existing default DataProvider behavior
  • Enables usage like useDataProvider<CustomDataProvider>() for typed custom providers

Testing

  • Commit hook/lint-staged passed successfully
  • Verified the updated core typing behavior locally

Closes #7445

@changeset-bot

changeset-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 28951c5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

[FEAT] useDataProvider hook should return the providers with their assigned types

1 participant