redux-toolkit
redux-toolkit copied to clipboard
Actually document the `TypedUse*` types
We have the TypedUse* types (TypedUseQuery, etc) to allow userland typing of things like hooks and hook results, but I don't think we actually describe those in the docs. We should add those.
Hi! 👋
I'd like to work on this issue.
I looked through the existing docs and confirmed that the TypedUse* types
(TypedUseQuery, TypedUseMutation, TypedUseQueryState, etc.) are currently not documented anywhere.
My plan is:
- Add a new section to the RTK Query TypeScript docs that introduces each
TypedUse*helper type - Describe when users may need these types (custom wrappers for hooks, typed API composition, etc.)
- Include short code examples for common use cases
- Add links to the relevant TypeScript source definitions
Does this direction look good to you?
If so, I’ll open a PR. 👍
@semimikoh sure, sounds good!