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

refactor: Change the variable name inside the retryTask function #31543

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wo-o29
Copy link

@wo-o29 wo-o29 commented Nov 14, 2024

Summary

This PR proposes to change the variable name x to suspenseOrError in the retryTask function. This change aims to improve code readability and make the intent of the code more clear.

Motivation

The current variable name x is not descriptive and doesn't convey the purpose or content of the variable. This can make the code harder to understand, especially for developers who are not intimately familiar with this part of the codebase.

Changes

Before change:

// Difficulty understanding intent
const x = thrownValue === SuspenseException ? getSuspendedThenable() : thrownValue;

After change:

// The intent is clear and the code is easy to understand.
const suspenseOrError = thrownValue === SuspenseException ? getSuspendedThenable() : thrownValue;

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 6:16pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants