Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug: Nested useTransition makes isPending of outer one always false #26226

Closed
gaearon opened this issue Feb 24, 2023 · 0 comments · Fixed by #26243
Closed

Bug: Nested useTransition makes isPending of outer one always false #26226

gaearon opened this issue Feb 24, 2023 · 0 comments · Fixed by #26243

Comments

@gaearon
Copy link
Collaborator

gaearon commented Feb 24, 2023

Nested startTransition call "takes over" and makes parent startTransition unable to track isPending.

Seb says it's a bug.

Repro:

https://codesandbox.io/s/pensive-breeze-rg70wn?file=/IndexPage.js:192-288

  1. Click the button
  2. isPending in IndexPage.js is true

However, isPending in App.js is false.

Expected: isPending in App.js is also true.

@gaearon gaearon added Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug Component: Concurrent Features and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Feb 24, 2023
@gaearon gaearon changed the title Bug: nested useTransition makes isPending of outer one always false Bug: Nested useTransition makes isPending of outer one always false Feb 24, 2023
sophiebits added a commit to sophiebits/react that referenced this issue Feb 25, 2023
sophiebits added a commit to sophiebits/react that referenced this issue Feb 25, 2023
sophiebits added a commit to sophiebits/react that referenced this issue Mar 16, 2023
sophiebits added a commit to sophiebits/react that referenced this issue Mar 16, 2023
sophiebits added a commit to sophiebits/react that referenced this issue Mar 16, 2023
sophiebits added a commit that referenced this issue Mar 16, 2023
github-actions bot pushed a commit that referenced this issue Mar 16, 2023
…ansition (#26243)

Fixes #26226. (Is this the right fix?)

DiffTrain build for [05777ff](05777ff)
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant