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

fix startTransition inside renderers when _callbacks is undefined #44586

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

Conversation

sync
Copy link

@sync sync commented May 15, 2024

Summary:

When using startTransition using latest react-native (0.74.1, new arch enabled) we get this error:

TypeError: Cannot read property 'add' of undefined

You can easily reproduce this issue creating a new react-native app (latest) and add a transition and execute it.

Sample app here: https://github.com/sync/Shift

Screenshot 2024-05-16 at 7 57 05 AM

Changelog:

[GENERAL] [FIXED] - fixed startTransition inside renderers when _callbacks is undefined

Test Plan:

Before

Screenshot 2024-05-16 at 7 57 05 AM

After

all good with the patch: sync/Shift#1

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels May 15, 2024
@sync sync force-pushed the fix-start-transition-renderer branch 2 times, most recently from e699598 to 3280e04 Compare May 15, 2024 23:58
@sync sync force-pushed the fix-start-transition-renderer branch from 3280e04 to 6f09893 Compare May 27, 2024 23:07
@brentvatne
Copy link
Collaborator

these files are synced from react and shouldn't be modified directly here.

ideally, we'd create a minimal repro with react-native (without any third-party dependencies) and post it on an issue here. or, if you believe you know what is causing this in react, you could create an issue on react with a repro or a pr with a failing test that demonstrates it

@sync
Copy link
Author

sync commented May 28, 2024

Thanks for having a look @brentvatne, have a minimal repo here: https://github.com/sync/Shift

@sync
Copy link
Author

sync commented May 28, 2024

I’ll have a look at the original files and see if anything changed in between versions

@sync
Copy link
Author

sync commented May 30, 2024

so yes the code is brand new (from 2 months ago) and was added in this commit: 3272b05

@sync
Copy link
Author

sync commented May 30, 2024

Code on the react repo that introduced this is very recent: acdlite/react@85b296e and master no longer have this code (it was removed here: acdlite/react@12a387d)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants