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

Introduce pre-typed hooks via hook.withTypes<RootState>() method #2114

Merged
merged 14 commits into from Jan 12, 2024

Conversation

aryaemami59
Copy link
Contributor

@aryaemami59 aryaemami59 commented Jan 5, 2024

This PR:

  • Implements the ability to create pre-typed versions of hooks, analogous to the existing createAsyncThunk.withTypes()
  • Adds hooks.withTypes.test-d.tsx type test file
  • Adds hooks.withTypes.test.tsx to test runtime behavior of hooks.withTypes
  • Adds JSDocs for hooks.withTypes
  • Adds hooks.withTypes to docs with examples

Copy link

codesandbox-ci bot commented Jan 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 349e0f0:

Sandbox Source
Vanilla Typescript Configuration

@aryaemami59 aryaemami59 marked this pull request as ready for review January 5, 2024 19:35
Copy link

netlify bot commented Jan 5, 2024

Deploy Preview for react-redux-docs ready!

Name Link
🔨 Latest commit 349e0f0
🔍 Latest deploy log https://app.netlify.com/sites/react-redux-docs/deploys/65a17173359e2d0008f20cf3
😎 Deploy Preview https://deploy-preview-2114--react-redux-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

docs/tutorials/typescript.md Outdated Show resolved Hide resolved
docs/using-react-redux/usage-with-typescript.md Outdated Show resolved Hide resolved
@EskiMojo14 EskiMojo14 merged commit 94fc5a3 into reduxjs:master Jan 12, 2024
21 checks passed
@aryaemami59 aryaemami59 deleted the withTypes branch January 12, 2024 17:10
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.

None yet

2 participants