Skip to content

docs(typescript): fix union type terminology#4839

Merged
timdorr merged 1 commit into
reduxjs:masterfrom
BonaventureCJ:docs/correct-loading-state-typescript-terminology
Jan 30, 2026
Merged

docs(typescript): fix union type terminology#4839
timdorr merged 1 commit into
reduxjs:masterfrom
BonaventureCJ:docs/correct-loading-state-typescript-terminology

Conversation

@BonaventureCJ

@BonaventureCJ BonaventureCJ commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Update documentation to correctly identify the loading state pattern as a string union type rather than an enum in both the explanatory text and the code example comments.

The current documentation refers to 'idle' | 'pending' | 'succeeded' | 'failed' as "enum values." In TypeScript, this is specifically a string union type. This change improves technical accuracy for users learning Redux Toolkit with TypeScript.

Updated:

Summary:
This PR standardizes terminology across the Redux Essentials, Part 5: Async Logic and Data Fetching guide. It corrects multiple instances where TypeScript String Union Types were inaccurately referred to as "enums."

Changes:
Updated introductory text in the "Loading State" section.
Corrected inline code comments in state examples.
Standardized references in the Thunk lifecycle and React component sections.
Ensures technical accuracy for developers learning RTK with TypeScript.

Why this is necessary:
The current documentation refers to 'idle' | 'pending' | 'succeeded' | 'failed' as "enum values." In TypeScript, this pattern is specifically a string union type. Labeling it an "enum" can be misleading for developers, as Enums in TypeScript are a distinct feature with runtime implications. This change ensures technical accuracy and consistent nomenclature for users learning Redux Toolkit in a TypeScript environment.


name: 📝 Documentation Fix
about: Fixing a problem in an existing docs page

Checklist

  • Is there an existing issue for this PR?
    • link issue here
  • Have the files been linted and formatted?

What docs page needs to be fixed?

  • Section:
  • Page:

What is the problem?

What changes does this PR make to fix the problem?

@codesandbox-ci

codesandbox-ci Bot commented Jan 29, 2026

Copy link
Copy Markdown

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.

@netlify

netlify Bot commented Jan 29, 2026

Copy link
Copy Markdown

Deploy Preview for redux-docs ready!

Name Link
🔨 Latest commit 02b46b5
🔍 Latest deploy log https://app.netlify.com/projects/redux-docs/deploys/697bb47b8087ce00089d6076
😎 Deploy Preview https://deploy-preview-4839--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 project configuration.

Update documentation to correctly identify the loading state
pattern as a string union type rather than an enum in both
the explanatory text and the code example comments.

The current documentation refers to 'idle' | 'pending' | 'succeeded'
| 'failed' as "enum values." In TypeScript, this is specifically
a string union type. This change improves technical accuracy for
users learning Redux Toolkit with TypeScript.
@BonaventureCJ BonaventureCJ force-pushed the docs/correct-loading-state-typescript-terminology branch from 57e07c6 to 02b46b5 Compare January 29, 2026 19:26
@timdorr

timdorr commented Jan 30, 2026

Copy link
Copy Markdown
Member

'thanks' | 'thank you'

@timdorr timdorr merged commit af8e64f into reduxjs:master Jan 30, 2026
12 checks passed
@BonaventureCJ

Copy link
Copy Markdown
Contributor Author

type Reply = "Much appreciated 🙏";

@BonaventureCJ BonaventureCJ deleted the docs/correct-loading-state-typescript-terminology branch January 31, 2026 21:54
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.

2 participants